Skip to content

Commit 19ce212

Browse files
[SYCL] Use -fsemantic-interposition for device_selector.cpp (#7022)
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.
1 parent d517148 commit 19ce212

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sycl/source/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ if (MSVC)
210210
set(SYCL_EXTRA_OPTS "/MD")
211211
endif()
212212

213+
# See https://github.com/llvm/llvm-project/issues/58295.
214+
set_source_files_properties(device_selector.cpp PROPERTIES COMPILE_FLAGS -fsemantic-interposition)
215+
213216
if (WIN32)
214217
set(LIB_NAME "sycl${SYCL_MAJOR_VERSION}")
215218
else()

0 commit comments

Comments
 (0)