Skip to content

Commit

Permalink
[SYCL] Use -fsemantic-interposition for device_selector.cpp (#7022)
Browse files Browse the repository at this point in the history
We build the whole project with `-fno-semantic-interposition` by default
and it gets miscompiled by clang after #6896.

It's not yet clear if this would be a permanent fix or if there is a bug
in clang. The issue is being tracked at llvm/llvm-project#58295.
  • Loading branch information
aelovikov-intel committed Oct 13, 2022
1 parent d517148 commit 19ce212
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sycl/source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ if (MSVC)
set(SYCL_EXTRA_OPTS "/MD")
endif()

# See https://github.com/llvm/llvm-project/issues/58295.
set_source_files_properties(device_selector.cpp PROPERTIES COMPILE_FLAGS -fsemantic-interposition)

if (WIN32)
set(LIB_NAME "sycl${SYCL_MAJOR_VERSION}")
else()
Expand Down

0 comments on commit 19ce212

Please sign in to comment.