Skip to content

Commit 1f8f9e3

Browse files
authored
[libc++] Correct libcxx default linker script behavior (#74130)
Patch 4b1fe09 introduced a bug when building libc++ for Fuchsia, it disabled the libc++.so linker script by default. This patch restores its original behavior.
1 parent 296088b commit 1f8f9e3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libcxx/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,14 @@ option(LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY
251251

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

0 commit comments

Comments
 (0)