@@ -1108,23 +1108,23 @@ class BinaryWrapper {
1108
1108
Fbin = *FBinOrErr;
1109
1109
} else {
1110
1110
1111
- // If '--offload-compress' option is specified and zstd is not
1112
- // available, throw an error.
1113
- if (OffloadCompressDevImgs && !llvm::compression::zstd::isAvailable ()) {
1114
- return createStringError (
1115
- inconvertibleErrorCode (),
1116
- " '--offload-compress' option is specified but zstd "
1117
- " is not available. The device image will not be "
1118
- " compressed." );
1119
- }
1120
-
1121
1111
// Don't compress if the user explicitly specifies the binary image
1122
1112
// format or if the image is smaller than OffloadCompressThreshold
1123
- // bytes.
1113
+ // bytes, or if zstd is not available .
1124
1114
if (Kind != OffloadKind::SYCL || !OffloadCompressDevImgs ||
1125
1115
Img.Fmt != BinaryImageFormat::none ||
1126
1116
!llvm::compression::zstd::isAvailable () ||
1127
1117
static_cast <int >(Bin->getBufferSize ()) < OffloadCompressThreshold) {
1118
+ // If '--offload-compress' option is specified and zstd is not
1119
+ // available, throw an error.
1120
+ if (OffloadCompressDevImgs &&
1121
+ !llvm::compression::zstd::isAvailable ()) {
1122
+ errs () << " '--offload-compress' option is specified but zstd "
1123
+ " is not available. The device image will not be "
1124
+ " compressed."
1125
+ << " \n " ;
1126
+ }
1127
+
1128
1128
Fbin = addDeviceImageToModule (
1129
1129
ArrayRef<char >(Bin->getBufferStart (), Bin->getBufferSize ()),
1130
1130
Twine (OffloadKindTag) + Twine (ImgId) + Twine (" .data" ), Kind,
0 commit comments