Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 94831aa

Browse files
[SYCL] Fix sycl_hpp_available in lit.cfg (#516)
1 parent eb11d4b commit 94831aa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

SYCL/lit.cfg.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,10 @@
204204
fp.write('int main() {}')
205205

206206
extra_sycl_include = ""
207-
sycl_hpp_available = subprocess.getstatusoutput(config.dpcpp_compiler+' -fsycl ' + check_sycl_hpp_file)
207+
sycl_hpp_available = subprocess.getstatusoutput(config.dpcpp_compiler + ' -fsycl ' + check_sycl_hpp_file + ("/c" if cl_options else "-c"))
208208
if sycl_hpp_available[0] != 0:
209+
lit_config.note('Simple include of sycl/sycl.hpp failed with output: ' + sycl_hpp_available[1] +
210+
'\nUsing fake sycl/sycl.hpp (which just points to CL/sycl.hpp)')
209211
extra_sycl_include = " " + ("/I" if cl_options else "-I") + config.extra_include
210212

211213
config.substitutions.append( ('%clangxx', ' '+ config.dpcpp_compiler + ' ' + config.cxx_flags + ' ' + arch_flag + extra_sycl_include) )

0 commit comments

Comments
 (0)