[libcxx-commits] [libcxx] r374510 - [libc++] Fix linker script generation
Petr Hosek via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Oct 10 21:54:35 PDT 2019
Author: phosek
Date: Thu Oct 10 21:54:35 2019
New Revision: 374510
URL: http://llvm.org/viewvc/llvm-project?rev=374510&view=rev
Log:
[libc++] Fix linker script generation
Handle the case when libc++abi and libunwind are being built together
with libc++ in the runtimes build. This logic was used in the previous
implementation but dropped in r374116.
Differential Revision: https://reviews.llvm.org/D68791
Modified:
libcxx/trunk/cmake/Modules/DefineLinkerScript.cmake
Modified: libcxx/trunk/cmake/Modules/DefineLinkerScript.cmake
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/cmake/Modules/DefineLinkerScript.cmake?rev=374510&r1=374509&r2=374510&view=diff
==============================================================================
--- libcxx/trunk/cmake/Modules/DefineLinkerScript.cmake (original)
+++ libcxx/trunk/cmake/Modules/DefineLinkerScript.cmake Thu Oct 10 21:54:35 2019
@@ -31,7 +31,9 @@ function(define_linker_script target)
set(link_libraries)
if (interface_libs)
foreach(lib IN LISTS interface_libs)
- if (TARGET "${lib}")
+ if (TARGET "${lib}" OR
+ (${lib} MATCHES "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI) OR
+ (${lib} MATCHES "unwind(_static|_shared)?" AND HAVE_LIBUNWIND))
list(APPEND link_libraries "${CMAKE_LINK_LIBRARY_FLAG}$<TARGET_PROPERTY:${lib},OUTPUT_NAME>")
else()
list(APPEND link_libraries "${CMAKE_LINK_LIBRARY_FLAG}${lib}")
More information about the libcxx-commits
mailing list