Skip to content

Commit 2d5adad

Browse files
[SYCL][CMake][LibDevice] Avoid gcc-toolchain fixup for /bin/g++
Should fix "/verify with" in llvm-test-suite. The issue was introduced in intel#7628.
1 parent 5a04090 commit 2d5adad

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libdevice/cmake/modules/SYCLLibdevice.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
3737
# freshly built clang. The system one might be very old.
3838
get_filename_component(gcc_bin_dir ${CMAKE_CXX_COMPILER} DIRECTORY)
3939
get_filename_component(gcc_install_dir ${gcc_bin_dir} DIRECTORY)
40-
list(APPEND compile_opts
41-
"--gcc-toolchain=${gcc_install_dir}")
40+
# /bin/g++ doesn't need any fixup.
41+
if (NOT gcc_install_dir STREQUAL "/")
42+
list(APPEND compile_opts "--gcc-toolchain=${gcc_install_dir}")
43+
endif()
4244
endif()
4345

4446
if ("NVPTX" IN_LIST LLVM_TARGETS_TO_BUILD)

0 commit comments

Comments
 (0)