Skip to content

Commit

Permalink
Merge pull request swiftlang#77625 from etcwilde/ewilde/stdlib-rebuil…
Browse files Browse the repository at this point in the history
…d-no-rtti-no-exceptions

[CMake] Disable RTTI and exceptions in stdlib
  • Loading branch information
etcwilde authored Nov 15, 2024
2 parents 5b2f3b7 + f9ea3bd commit 4f32598
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Runtimes/Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ add_compile_definitions(
$<$<COMPILE_LANGUAGE:C,CXX>:-DSWIFT_RUNTIME_ENABLE_LEAK_CHECKER=$<BOOL:${SwiftCore_ENABLE_RUNTIME_LEAK_CHECKER}>>
$<$<COMPILE_LANGUAGE:C,CXX>:-DSWIFT_RUNTIME_CLOBBER_FREED_OBJECTS=$<BOOL:${SwiftCore_ENABLE_CLOBBER_FREED_OBJECTS}>>)

add_compile_options($<$<AND:$<COMPILE_LANGUAGE:Swift>,$<BOOL:${SwiftCore_ENABLE_LIBRARY_EVOLUTION}>>:-enable-library-evolution>)
add_compile_options(
$<$<COMPILE_LANGUAGE:CXX>:-fno-rtti>
$<$<COMPILE_LANGUAGE:CXX>:-fno-exceptions>
$<$<COMPILE_LANGUAGE:CXX>:-funwind-tables>
$<$<AND:$<COMPILE_LANGUAGE:Swift>,$<BOOL:${SwiftCore_ENABLE_LIBRARY_EVOLUTION}>>:-enable-library-evolution>)

include_directories(include)

Expand Down

0 comments on commit 4f32598

Please sign in to comment.