-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Commit
We shouldn't need to link against libc++ or libc++abi when building libunwind, since that would otherwise be a circular dependency.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,20 +66,24 @@ set(LIBUNWIND_SOURCES | |
${LIBUNWIND_ASM_SOURCES}) | ||
|
||
# Generate library list. | ||
if (LIBUNWIND_USE_COMPILER_RT) | ||
add_library_flags("${LIBUNWIND_BUILTINS_LIBRARY}") | ||
if (CXX_SUPPORTS_NOSTDLIBXX_FLAG) | ||
add_link_flags_if_supported(-nostdlib++) | ||
else() | ||
add_library_flags_if(LIBUNWIND_HAS_GCC_S_LIB gcc_s) | ||
add_library_flags_if(LIBUNWIND_HAS_GCC_LIB gcc) | ||
endif() | ||
if (NOT APPLE) # On Apple platforms, we don't need to link explicitly against system libraries | ||
if (LIBUNWIND_USE_COMPILER_RT) | ||
add_library_flags("${LIBUNWIND_BUILTINS_LIBRARY}") | ||
else() | ||
add_library_flags_if(LIBUNWIND_HAS_GCC_S_LIB gcc_s) | ||
add_library_flags_if(LIBUNWIND_HAS_GCC_LIB gcc) | ||
endif() | ||
add_library_flags_if(LIBUNWIND_HAS_C_LIB c) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ldionne
Author
Member
|
||
endif() | ||
|
||
if (NOT APPLE) | ||
add_library_flags_if(LIBUNWIND_HAS_DL_LIB dl) | ||
endif() | ||
|
||
if (LIBUNWIND_ENABLE_THREADS) | ||
if (LIBUNWIND_ENABLE_THREADS AND NOT APPLE) | ||
add_library_flags_if(LIBUNWIND_HAS_PTHREAD_LIB pthread) | ||
add_compile_flags_if(LIBUNWIND_WEAK_PTHREAD_LIB -DLIBUNWIND_USE_WEAK_PTHREAD=1) | ||
endif() | ||
endif() | ||
|
||
if (LIBUNWIND_ENABLE_THREADS) | ||
|
@ldionne - I'm investigating a regression with my toolchain build of the
libunwind
shared object.Before this commit landed, IIUC we would unconditionally check
LIBUNWIND_HAS_C_LIB
and add-lc
if it was present. But now, we only checkLIBUNWIND_HAS_C_LIB
ifCXX_SUPPORTS_NOSTDLIBXX_FLAG
isOFF
. Is that what's expected? I'm wondering if this commit guarded theadd_library_flags_if(LIBUNWIND_HAS_C_LIB c)
incorrectly, or if perhaps my libunwind build shouldn't have depended on libc?Unabridged (success) log from e9af57dfea1637a3872052b317c9fe6c71b8d290.log
Unabridged (failing) log from ab41ea4be364dcac32d0c4ec990735c8adb279c8.log