From a01d95c717722b34ed032ef2962e185afc2eb6f6 Mon Sep 17 00:00:00 2001 From: denis-kabanov Date: Tue, 19 Oct 2021 08:26:05 +0300 Subject: [PATCH] [SYCL] Fix sycl_hpp_available in lit.cfg (intel/llvm-test-suite#516) --- SYCL/lit.cfg.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SYCL/lit.cfg.py b/SYCL/lit.cfg.py index a9dea62c9ad3a..54085dc85a632 100644 --- a/SYCL/lit.cfg.py +++ b/SYCL/lit.cfg.py @@ -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) )