Skip to content

Commit

Permalink
[SYCL] Fix sycl_hpp_available in lit.cfg (intel/llvm-test-suite#516)
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-kabanov authored Oct 19, 2021
1 parent ac5b9ff commit a01d95c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion SYCL/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,10 @@
fp.write('int main() {}')

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

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

0 comments on commit a01d95c

Please sign in to comment.