mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
fix: Add OCL C extensions to empty device ext string for Clang 14 compatibility
Clang 13+ requires (1) that each enabled extension be accompanied by corresponding OCL C extension macro definitions. Fix the extension string for empty device cases to conform to that - pass the same language feature macros as we would for regular image support. (1) release/14.x/clang/lib/Basic/OpenCLOptions.cpp#L142-L149 Related-To: HSD-18031230472 Signed-off-by: Artem Gindinson <artem.gindinson@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
4ca213d4d7
commit
7afedd7a63
@@ -616,7 +616,9 @@ int OfflineCompiler::initialize(size_t numArgs, const std::vector<std::string> &
|
||||
}
|
||||
|
||||
if (deviceName.empty()) {
|
||||
internalOptions = CompilerOptions::concatenate("-ocl-version=300 -cl-ext=-all,+cl_khr_3d_image_writes", internalOptions);
|
||||
std::string emptyDeviceOptions = "-ocl-version=300 -cl-ext=-all,+cl_khr_3d_image_writes,"
|
||||
"+__opencl_c_3d_image_writes,+__opencl_c_images";
|
||||
internalOptions = CompilerOptions::concatenate(emptyDeviceOptions, internalOptions);
|
||||
CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::enableImageSupport);
|
||||
} else {
|
||||
appendExtensionsToInternalOptions(hwInfo, options, internalOptions);
|
||||
|
||||
Reference in New Issue
Block a user