Skip to content

[libc++] Correct libcxx default linker script behavior #74130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions libcxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,14 @@ option(LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY

# Generate and install a linker script inplace of libc++.so. The linker script
# will link libc++ to the correct ABI library. This option is on by default
# on UNIX platforms other than Apple unless we statically link libc++abi
# inside libc++.so, we don't build libc++.so at all or we don't have any
# ABI library.
# on UNIX platforms other than Apple, and on the Fuchsia platform unless we
# statically link libc++abi inside libc++.so, we don't build libc++.so at all
# or we don't have any ABI library.
if (LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY
OR NOT LIBCXX_ENABLE_SHARED
OR LIBCXX_CXX_ABI STREQUAL "none")
set(ENABLE_LINKER_SCRIPT_DEFAULT_VALUE OFF)
elseif(UNIX AND NOT APPLE)
elseif((UNIX OR FUCHSIA) AND NOT APPLE)
set(ENABLE_LINKER_SCRIPT_DEFAULT_VALUE ON)
else()
set(ENABLE_LINKER_SCRIPT_DEFAULT_VALUE OFF)
Expand Down