File tree Expand file tree Collapse file tree 6 files changed +40
-4
lines changed Expand file tree Collapse file tree 6 files changed +40
-4
lines changed Original file line number Diff line number Diff line change @@ -279,7 +279,9 @@ endif()
279
279
280
280
# Feature options -------------------------------------------------------------
281
281
option (LIBCXX_ENABLE_EXCEPTIONS "Use exceptions." ON )
282
- option (LIBCXX_ENABLE_RTTI "Use run time type information." ON )
282
+ option (LIBCXX_ENABLE_RTTI
283
+ "Use run time type information.
284
+ This option may only be set to OFF when LIBCXX_ENABLE_EXCEPTIONS=OFF." ON )
283
285
option (LIBCXX_ENABLE_THREADS "Build libc++ with support for threads." ON )
284
286
option (LIBCXX_ENABLE_MONOTONIC_CLOCK
285
287
"Build libc++ with support for a monotonic clock.
@@ -370,6 +372,11 @@ if (LIBCXX_HAS_PTHREAD_API)
370
372
endif ()
371
373
endif ()
372
374
375
+ if (NOT LIBCXX_ENABLE_RTTI AND LIBCXX_ENABLE_EXCEPTIONS)
376
+ message (FATAL_ERROR "The option LIBCXX_ENABLE_RTTI can not be turned off"
377
+ " when LIBCXX_ENABLE_EXCEPTIONS is turned on." )
378
+ endif ()
379
+
373
380
# Ensure LLVM_USE_SANITIZER is not specified when LIBCXX_GENERATE_COVERAGE
374
381
# is ON.
375
382
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 @@ -378,6 +378,7 @@ libc++ Feature Options
378
378
**Default **: ``ON ``
379
379
380
380
Build libc++ with run time type information.
381
+ This option may only be set to OFF when LIBCXX_ENABLE_EXCEPTIONS=OFF.
381
382
382
383
.. option :: LIBCXX_INCLUDE_TESTS:BOOL
383
384
Original file line number Diff line number Diff line change @@ -196,9 +196,7 @@ namespace __any_imp
196
196
if (__id && *__id == typeid (_Tp))
197
197
return true ;
198
198
#endif
199
- if (!__id && __fallback_id == __any_imp::__get_fallback_typeid<_Tp>())
200
- return true ;
201
- return false ;
199
+ return !__id && __fallback_id == __any_imp::__get_fallback_typeid<_Tp>();
202
200
}
203
201
204
202
template <class _Tp >
Original file line number Diff line number Diff line change @@ -741,6 +741,27 @@ steps:
741
741
limit : 2
742
742
timeout_in_minutes : 120
743
743
744
+ - label : " No RTTI"
745
+ command : " libcxx/utils/ci/run-buildbot generic-no-rtti"
746
+ artifact_paths :
747
+ - " **/test-results.xml"
748
+ - " **/*.abilist"
749
+ env :
750
+ # Note: Modules require and absolute path for clang-scan-deps
751
+ # https://github.com/llvm/llvm-project/issues/61006
752
+ CC : " /usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang"
753
+ CXX : " /usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang++"
754
+ CMAKE : " /opt/bin/cmake"
755
+ ENABLE_CLANG_TIDY : " On"
756
+ agents :
757
+ queue : " libcxx-builders"
758
+ os : " linux"
759
+ retry :
760
+ automatic :
761
+ - exit_status : -1 # Agent was lost
762
+ limit : 2
763
+ timeout_in_minutes : 120
764
+
744
765
- label : " Unstable ABI"
745
766
command : " libcxx/utils/ci/run-buildbot generic-abi-unstable"
746
767
artifact_paths :
Original file line number Diff line number Diff line change @@ -476,6 +476,11 @@ generic-no-exceptions)
476
476
check-runtimes
477
477
check-abi-list
478
478
;;
479
+ generic-no-rtti)
480
+ clean
481
+ generate-cmake -C " ${MONOREPO_ROOT} /libcxx/cmake/caches/Generic-no-rtti.cmake"
482
+ check-runtimes
483
+ ;;
479
484
#
480
485
# Other miscellaneous jobs
481
486
#
You can’t perform that action at this time.
0 commit comments