File tree Expand file tree Collapse file tree 5 files changed +21
-1
lines changed Expand file tree Collapse file tree 5 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ jobs:
160160 ' generic-no-tzdb' ,
161161 ' generic-no-unicode' ,
162162 ' generic-no-wide-characters' ,
163+ ' generic-no-rtti' ,
163164 ' generic-static' ,
164165 ' generic-with_llvm_unwinder' ,
165166 # TODO Find a better place for the benchmark and bootstrapping builds to live. They're either very expensive
Original file line number Diff line number Diff line change @@ -284,7 +284,9 @@ endif()
284284
285285# Feature options -------------------------------------------------------------
286286option (LIBCXX_ENABLE_EXCEPTIONS "Use exceptions." ON )
287- option (LIBCXX_ENABLE_RTTI "Use run time type information." ON )
287+ option (LIBCXX_ENABLE_RTTI
288+ "Use runtime type information.
289+ This option may only be set to OFF when LIBCXX_ENABLE_EXCEPTIONS=OFF." ON )
288290option (LIBCXX_ENABLE_THREADS "Build libc++ with support for threads." ON )
289291option (LIBCXX_ENABLE_MONOTONIC_CLOCK
290292 "Build libc++ with support for a monotonic clock.
@@ -374,6 +376,13 @@ if (LIBCXX_HAS_PTHREAD_API)
374376 endif ()
375377endif ()
376378
379+ if (NOT LIBCXX_ENABLE_RTTI AND LIBCXX_ENABLE_EXCEPTIONS)
380+ message (FATAL_ERROR "Libc++ cannot be built with exceptions enabled but RTTI"
381+ " disabled, since that configuration is broken. See"
382+ " https://github.com/llvm/llvm-project/issues/66117"
383+ " for details." )
384+ endif ()
385+
377386# Ensure LLVM_USE_SANITIZER is not specified when LIBCXX_GENERATE_COVERAGE
378387# is ON.
379388if (LLVM_USE_SANITIZER AND LIBCXX_GENERATE_COVERAGE)
Original file line number Diff line number Diff line change 1+ set (LIBCXX_ENABLE_RTTI OFF CACHE BOOL "" )
2+ set (LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "" )
3+ set (LIBCXXABI_ENABLE_RTTI OFF CACHE BOOL "" )
4+ set (LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "" )
Original file line number Diff line number Diff line change @@ -369,6 +369,7 @@ libc++ Feature Options
369369 **Default **: ``ON ``
370370
371371 Build libc++ with run time type information.
372+ This option may only be set to OFF when LIBCXX_ENABLE_EXCEPTIONS=OFF.
372373
373374.. option :: LIBCXX_INCLUDE_TESTS:BOOL
374375
Original file line number Diff line number Diff line change @@ -472,6 +472,11 @@ generic-no-exceptions)
472472 check-runtimes
473473 check-abi-list
474474;;
475+ generic-no-rtti)
476+ clean
477+ generate-cmake -C " ${MONOREPO_ROOT} /libcxx/cmake/caches/Generic-no-rtti.cmake"
478+ check-runtimes
479+ ;;
475480#
476481# Other miscellaneous jobs
477482#
You can’t perform that action at this time.
0 commit comments