Skip to content

Commit

Permalink
[libc++] Fix the no-exceptions build of libc++ on Apple
Browse files Browse the repository at this point in the history
We previously tried re-exporting symbols that didn't exist when
exceptions were disabled. Note that building libc++abi without
exceptions still doesn't work when linking against the default-provided
libSystem.dylib, because it transitively depends on libobjc.dylib,
and that requires __gxx_personality_v0. But building libc++abi
with exceptions and libc++ without exceptions does work.
  • Loading branch information
ldionne committed Apr 20, 2020
1 parent 865996d commit ecf313c
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 519 deletions.
3 changes: 2 additions & 1 deletion libcxx/lib/abi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ if (EXISTS "${ABILIST_FILE}"
AND TARGET cxx_shared
AND ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxabi" OR
(APPLE AND "${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "default"))
AND NOT LIBCXX_ABI_UNSTABLE)
AND NOT LIBCXX_ABI_UNSTABLE
AND LIBCXX_ENABLE_EXCEPTIONS)
add_custom_target(check-cxx-abilist
${SYMDIFF_EXE} --only-stdlib-symbols --strict ${ABILIST_FILE}
$<TARGET_SONAME_FILE:cxx_shared>
Expand Down
10 changes: 10 additions & 0 deletions libcxx/lib/libc++abi-exceptions.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
___cxa_allocate_exception
___cxa_begin_catch
___cxa_call_unexpected
___cxa_current_exception_type
___cxa_end_catch
___cxa_free_exception
___cxa_get_exception_ptr
___cxa_rethrow
___cxa_throw
___gxx_personality_v0
10 changes: 10 additions & 0 deletions libcxx/lib/libc++abi-exceptions.sjlj.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
___cxa_allocate_exception
___cxa_begin_catch
___cxa_call_unexpected
___cxa_current_exception_type
___cxa_end_catch
___cxa_free_exception
___cxa_get_exception_ptr
___cxa_rethrow
___cxa_throw
___gxx_personality_sj0
10 changes: 0 additions & 10 deletions libcxx/lib/libc++abi.v1.exp
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
___cxa_allocate_exception
___cxa_end_catch
___cxa_demangle
___cxa_current_exception_type
___cxa_call_unexpected
___cxa_free_exception
___cxa_get_exception_ptr
___cxa_get_globals
___cxa_get_globals_fast
___cxa_guard_abort
___cxa_guard_acquire
___cxa_guard_release
___cxa_rethrow
___cxa_pure_virtual
___cxa_deleted_virtual
___cxa_begin_catch
___cxa_throw
___cxa_vec_cctor
___cxa_vec_cleanup
___cxa_vec_ctor
Expand All @@ -26,7 +17,6 @@ ___cxa_vec_new
___cxa_vec_new2
___cxa_vec_new3
___dynamic_cast
___gxx_personality_v0
__ZTIDi
__ZTIDn
__ZTIDs
Expand Down
10 changes: 0 additions & 10 deletions libcxx/lib/libc++abi.v2.exp
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
___cxa_allocate_exception
___cxa_end_catch
___cxa_demangle
___cxa_current_exception_type
___cxa_call_unexpected
___cxa_free_exception
___cxa_get_exception_ptr
___cxa_get_globals
___cxa_get_globals_fast
___cxa_guard_abort
___cxa_guard_acquire
___cxa_guard_release
___cxa_rethrow
___cxa_pure_virtual
___cxa_deleted_virtual
___cxa_begin_catch
___cxa_throw
___cxa_throw_bad_array_new_length
___cxa_uncaught_exceptions
___cxa_vec_cctor
Expand All @@ -28,7 +19,6 @@ ___cxa_vec_new
___cxa_vec_new2
___cxa_vec_new3
___dynamic_cast
___gxx_personality_v0
__ZTIDi
__ZTIDn
__ZTIDs
Expand Down
160 changes: 0 additions & 160 deletions libcxx/lib/libc++sjlj-abi.v1.exp

This file was deleted.

Loading

0 comments on commit ecf313c

Please sign in to comment.