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

[SYCL] Remove <sycl/sycl.hpp> workaround #1344

Merged
merged 1 commit into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions SYCL/include/sycl/sycl.hpp

This file was deleted.

18 changes: 2 additions & 16 deletions SYCL/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,26 +271,12 @@
else:
arch_flag = ""

# Add an extra include directory which points to a fake sycl/sycl.hpp (which just points to CL/sycl.hpp)
# location to workaround compiler versions which do not provide this header
check_sycl_hpp_file='sycl_hpp_include.cpp'
with open(check_sycl_hpp_file, 'w') as fp:
fp.write('#include <sycl/sycl.hpp>\n')
fp.write('int main() {}')

extra_sycl_include = ""
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

if lit_config.params.get('compatibility_testing', False):
config.substitutions.append( ('%clangxx', ' true ') )
config.substitutions.append( ('%clang', ' true ') )
else:
config.substitutions.append( ('%clangxx', ' '+ config.dpcpp_compiler + ' ' + config.cxx_flags + ' ' + arch_flag + extra_sycl_include) )
config.substitutions.append( ('%clang', ' ' + config.dpcpp_compiler + ' ' + config.c_flags + extra_sycl_include) )
config.substitutions.append( ('%clangxx', ' '+ config.dpcpp_compiler + ' ' + config.cxx_flags + ' ' + arch_flag) )
config.substitutions.append( ('%clang', ' ' + config.dpcpp_compiler + ' ' + config.c_flags) )

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

Expand Down