Skip to content

Commit ecc9d15

Browse files
[SYCL] Fix syclbin-dump build on non clang/gcc compilers (#18233)
This commit avoids a warning produced by #16873 when building syclbin-dump using compilers other than gcc and clang, where the -fno-rtti option isn't available. Signed-off-by: Larsen, Steffen <[email protected]>
1 parent c997f77 commit ecc9d15

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sycl/tools/syclbin-dump/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ if (WIN32 AND "${build_type_lower}" MATCHES "debug")
1212
endif()
1313
target_link_libraries(syclbin-dump PRIVATE ${sycl_lib})
1414

15-
target_compile_options(syclbin-dump PRIVATE -fno-rtti)
15+
if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR
16+
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
17+
target_compile_options(syclbin-dump PRIVATE -fno-rtti)
18+
endif()
1619

1720
add_dependencies(sycl-toolchain syclbin-dump)
1821

0 commit comments

Comments
 (0)