Skip to content

Commit 6554698

Browse files
authored
Don't pass outdated -D__undef_<feature> flags to clang (#606)
The flags were removed in llvm/llvm-project@423bdb2b
1 parent 3c31b1e commit 6554698

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

options_compile.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -330,21 +330,6 @@ std::string EffectiveOptionsFilter::processOptions(const OpenCLArgList &args,
330330
parsedOclCFeatures.insert(a);
331331
});
332332

333-
// "opencl-c-base.h" unconditionally enables a list of so-called "optional
334-
// core" language features. We need to undef those that aren't explicitly
335-
// defined within the compilation command (which would suggest that the
336-
// target platform supports the corresponding feature).
337-
const char* optionalCoreOclCFeaturesList[] = {
338-
"__opencl_c_work_group_collective_functions",
339-
"__opencl_c_atomic_order_seq_cst",
340-
"__opencl_c_atomic_scope_device",
341-
"__opencl_c_atomic_scope_all_devices",
342-
"__opencl_c_read_write_images" };
343-
for (std::string OclCFeature : optionalCoreOclCFeaturesList) {
344-
if (!parsedOclCFeatures.contains(std::string("-D") + OclCFeature))
345-
effectiveArgs.push_back(std::string("-D__undef_") + OclCFeature);
346-
}
347-
348333
// extension is enabled in PCH but disabled or not specifed in options =>
349334
// disable pch
350335
bool useModules =

0 commit comments

Comments
 (0)