Skip to content

Commit b8c6252

Browse files
authored
[libc++abi] Always re-export std:: exception types from libc++abi (llvm#84031)
We always provide the std:: exception types, even when exceptions are disabled. This is a bit counter-intuitive, but these exception types are just normal types at the end of the day so we made the decision to always provide their definition. Failure to re-export these types would cause libc++ to fail to link on Apple platforms when exceptions are disabled.
1 parent b6ca602 commit b8c6252

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: libcxxabi/src/CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,12 @@ if (LIBCXXABI_ENABLE_SHARED)
230230
reexport_symbols("${CMAKE_CURRENT_SOURCE_DIR}/../lib/new-delete.exp")
231231
endif()
232232

233+
# Note that std:: exception types are always defined by the library regardless of
234+
# whether the exception runtime machinery is provided.
235+
reexport_symbols("${CMAKE_CURRENT_SOURCE_DIR}/../lib/std-exceptions.exp")
236+
233237
if (LIBCXXABI_ENABLE_EXCEPTIONS)
234238
reexport_symbols("${CMAKE_CURRENT_SOURCE_DIR}/../lib/itanium-exceptions.exp")
235-
reexport_symbols("${CMAKE_CURRENT_SOURCE_DIR}/../lib/std-exceptions.exp")
236239

237240
if ("${CMAKE_OSX_ARCHITECTURES}" MATCHES "^(armv6|armv7|armv7s)$")
238241
reexport_symbols("${CMAKE_CURRENT_SOURCE_DIR}/../lib/personality-sjlj.exp")

0 commit comments

Comments
 (0)