File tree 5 files changed +21
-1
lines changed 5 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ jobs:
160
160
' generic-no-tzdb' ,
161
161
' generic-no-unicode' ,
162
162
' generic-no-wide-characters' ,
163
+ ' generic-no-rtti' ,
163
164
' generic-static' ,
164
165
' generic-with_llvm_unwinder' ,
165
166
# 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()
284
284
285
285
# Feature options -------------------------------------------------------------
286
286
option (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 )
288
290
option (LIBCXX_ENABLE_THREADS "Build libc++ with support for threads." ON )
289
291
option (LIBCXX_ENABLE_MONOTONIC_CLOCK
290
292
"Build libc++ with support for a monotonic clock.
@@ -374,6 +376,13 @@ if (LIBCXX_HAS_PTHREAD_API)
374
376
endif ()
375
377
endif ()
376
378
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
+
377
386
# Ensure LLVM_USE_SANITIZER is not specified when LIBCXX_GENERATE_COVERAGE
378
387
# is ON.
379
388
if (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
369
369
**Default **: ``ON ``
370
370
371
371
Build libc++ with run time type information.
372
+ This option may only be set to OFF when LIBCXX_ENABLE_EXCEPTIONS=OFF.
372
373
373
374
.. option :: LIBCXX_INCLUDE_TESTS:BOOL
374
375
Original file line number Diff line number Diff line change @@ -472,6 +472,11 @@ generic-no-exceptions)
472
472
check-runtimes
473
473
check-abi-list
474
474
;;
475
+ generic-no-rtti)
476
+ clean
477
+ generate-cmake -C " ${MONOREPO_ROOT} /libcxx/cmake/caches/Generic-no-rtti.cmake"
478
+ check-runtimes
479
+ ;;
475
480
#
476
481
# Other miscellaneous jobs
477
482
#
You can’t perform that action at this time.
0 commit comments