Skip to content

Commit cc4c369

Browse files
[SYCL] Remove <sycl/sycl.hpp> workaround (intel#1344)
1 parent b5f1871 commit cc4c369

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

SYCL/lit.cfg.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -271,26 +271,12 @@
271271
else:
272272
arch_flag = ""
273273

274-
# Add an extra include directory which points to a fake sycl/sycl.hpp (which just points to CL/sycl.hpp)
275-
# location to workaround compiler versions which do not provide this header
276-
check_sycl_hpp_file='sycl_hpp_include.cpp'
277-
with open(check_sycl_hpp_file, 'w') as fp:
278-
fp.write('#include <sycl/sycl.hpp>\n')
279-
fp.write('int main() {}')
280-
281-
extra_sycl_include = ""
282-
sycl_hpp_available = subprocess.getstatusoutput(config.dpcpp_compiler + ' -fsycl ' + check_sycl_hpp_file + ' ' + ("/c" if cl_options else "-c"))
283-
if sycl_hpp_available[0] != 0:
284-
lit_config.note('Simple include of sycl/sycl.hpp failed with output: ' + sycl_hpp_available[1] +
285-
'\nUsing fake sycl/sycl.hpp (which just points to CL/sycl.hpp)')
286-
extra_sycl_include = " " + ("/I" if cl_options else "-I") + config.extra_include
287-
288274
if lit_config.params.get('compatibility_testing', False):
289275
config.substitutions.append( ('%clangxx', ' true ') )
290276
config.substitutions.append( ('%clang', ' true ') )
291277
else:
292-
config.substitutions.append( ('%clangxx', ' '+ config.dpcpp_compiler + ' ' + config.cxx_flags + ' ' + arch_flag + extra_sycl_include) )
293-
config.substitutions.append( ('%clang', ' ' + config.dpcpp_compiler + ' ' + config.c_flags + extra_sycl_include) )
278+
config.substitutions.append( ('%clangxx', ' '+ config.dpcpp_compiler + ' ' + config.cxx_flags + ' ' + arch_flag) )
279+
config.substitutions.append( ('%clang', ' ' + config.dpcpp_compiler + ' ' + config.c_flags) )
294280

295281
config.substitutions.append( ('%threads_lib', config.sycl_threads_lib) )
296282

0 commit comments

Comments
 (0)