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()
279279
280280# Feature options -------------------------------------------------------------
281281option (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 )
283285option (LIBCXX_ENABLE_THREADS "Build libc++ with support for threads." ON )
284286option (LIBCXX_ENABLE_MONOTONIC_CLOCK
285287 "Build libc++ with support for a monotonic clock.
@@ -370,6 +372,11 @@ if (LIBCXX_HAS_PTHREAD_API)
370372 endif ()
371373endif ()
372374
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+
373380# Ensure LLVM_USE_SANITIZER is not specified when LIBCXX_GENERATE_COVERAGE
374381# is ON.
375382if (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
378378 **Default **: ``ON ``
379379
380380 Build libc++ with run time type information.
381+ This option may only be set to OFF when LIBCXX_ENABLE_EXCEPTIONS=OFF.
381382
382383.. option :: LIBCXX_INCLUDE_TESTS:BOOL
383384
Original file line number Diff line number Diff line change @@ -196,9 +196,7 @@ namespace __any_imp
196196 if (__id && *__id == typeid (_Tp))
197197 return true ;
198198#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>();
202200 }
203201
204202 template <class _Tp >
Original file line number Diff line number Diff line change @@ -741,6 +741,27 @@ steps:
741741 limit : 2
742742 timeout_in_minutes : 120
743743
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+
744765 - label : " Unstable ABI"
745766 command : " libcxx/utils/ci/run-buildbot generic-abi-unstable"
746767 artifact_paths :
Original file line number Diff line number Diff line change @@ -476,6 +476,11 @@ generic-no-exceptions)
476476 check-runtimes
477477 check-abi-list
478478;;
479+ generic-no-rtti)
480+ clean
481+ generate-cmake -C " ${MONOREPO_ROOT} /libcxx/cmake/caches/Generic-no-rtti.cmake"
482+ check-runtimes
483+ ;;
479484#
480485# Other miscellaneous jobs
481486#
You can’t perform that action at this time.
0 commit comments