Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions orc-rt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,15 @@ set(ORC_RT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})

# Configure RTTI and exceptions compile flags
set(ORC_RT_COMPILE_FLAGS)
if(NOT ORC_RT_ENABLE_RTTI)
if(ORC_RT_ENABLE_RTTI)
list(APPEND ORC_RT_COMPILE_FLAGS -frtti)
else()
list(APPEND ORC_RT_COMPILE_FLAGS -fno-rtti)
endif()

if(NOT ORC_RT_ENABLE_EXCEPTIONS)
if(ORC_RT_ENABLE_EXCEPTIONS)
list(APPEND ORC_RT_COMPILE_FLAGS -fexceptions)
else()
list(APPEND ORC_RT_COMPILE_FLAGS -fno-exceptions)
endif()

Expand Down
1 change: 1 addition & 0 deletions orc-rt/unittests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ add_orc_rt_unittest(CoreTests
span-test.cpp
DISABLE_LLVM_LINK_LLVM_DYLIB
)
target_compile_options(CoreTests PRIVATE ${ORC_RT_COMPILE_FLAGS})
Copy link
Contributor

@jaredwy jaredwy Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could instead use the CXX_RTTI and CXX_EXCEPTIONS properties here, and do the checks here instead of inside the the header. This is more akin to how a library consumer would compile the orc-rt.

These are cross platform and will work on windows (but we don't have that supported yet)

Copy link
Contributor

@jaredwy jaredwy Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set_target_properties(CoreTests PROPERTIES
 CXX_RTTI ${ORC_RT_ENABLE_RTTI}
 CXX_EXCEPTIONS ${ORC_RT_ENABLE_EXCEPTIONS}
)

something like this should work, but you would also need to ensure its on the executor etc

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It look like these are unique to a previous project.

Feel free to merge and ill introduce these later when I add windows support.

target_link_libraries(CoreTests PRIVATE orc-rt-executor)
Loading