[llvm] [libsycl] Fix debug build error caused by RTTI option mismatch (PR #210997)
Kseniya Tikhomirova via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 31 05:24:05 PDT 2026
================
@@ -1,14 +1,15 @@
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../runtimes/cmake/Modules")
include(WarningFlags)
function(add_sycl_rt_library LIB_TARGET_NAME LIB_OBJ_NAME LIB_OUTPUT_NAME)
- cmake_parse_arguments(ARG "" "" "COMPILE_OPTIONS;SOURCES" ${ARGN})
+ cmake_parse_arguments(ARG "" "" "COMPILE_OPTIONS;SOURCES;NO_RTTI_SOURCES" ${ARGN})
add_library(${LIB_OBJ_NAME} OBJECT ${ARG_SOURCES})
# Common compilation step setup
target_compile_definitions(${LIB_OBJ_NAME} PRIVATE
$<$<STREQUAL:${CMAKE_SYSTEM_NAME},Windows>:_LIBSYCL_BUILDING_LIBRARY>)
cxx_add_warning_flags(${LIB_OBJ_NAME} ${LIBSYCL_ENABLE_WERROR} ${LIBSYCL_ENABLE_PEDANTIC})
+ set_source_files_properties(${ARG_NO_RTTI_SOURCES} PROPERTIES COMPILE_FLAGS -fno-rtti)
----------------
KseniyaTikhomirova wrote:
LLVM has its own flag to enable RTTI for all projects. Should we add condition here then?
https://github.com/llvm/llvm-project/pull/210997
More information about the llvm-commits
mailing list