Skip to content

Commit 338d418

Browse files
committed
[CMake][ENCODEGEN] Also consider EH and RTTI options in ecodegen
The options `TPDE_ENABLE_EH` and `LLVM_ENABLE_RTTI` were not yet taken into account in the encodegen subproject.
1 parent dff0a2d commit 338d418

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tpde-encodegen/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ set(TPDE_LINK_LLVM_STATIC FALSE CACHE BOOL "Should LLVM be linked statically?")
1515
target_include_directories(tpde_encodegen SYSTEM PRIVATE ${LLVM_INCLUDE_DIRS})
1616
separate_arguments(LLVM_DEFINITIONS_LIST NATIVE_COMMAND ${LLVM_DEFINITIONS})
1717
target_compile_definitions(tpde_encodegen PRIVATE ${LLVM_DEFINITIONS_LIST})
18-
target_compile_options(tpde_encodegen PRIVATE "$<$<COMPILE_LANGUAGE:CXX>:-fno-rtti;-fno-exceptions>")
18+
if (NOT LLVM_ENABLE_RTTI)
19+
target_compile_options(tpde_encodegen PRIVATE "-fno-rtti")
20+
endif ()
1921
if (TPDE_LINK_LLVM_STATIC)
2022
set(LLVM_COMPONENTS
2123
core CodeGen irreader irprinter passes mc support targetparser asmparser asmprinter bitreader bitstreamreader

0 commit comments

Comments
 (0)