[PATCH] D47865: [CMake] Filter out -z, defs when building custom libc++
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 7 11:31:56 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL334212: [CMake] Filter out -z,defs when building custom libc++ (authored by phosek, committed by ).
Herald added a subscriber: delcypher.
Changed prior to commit:
https://reviews.llvm.org/D47865?vs=150254&id=150370#toc
Repository:
rL LLVM
https://reviews.llvm.org/D47865
Files:
compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
Index: compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
===================================================================
--- compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
+++ compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake
@@ -512,9 +512,6 @@
set(PASSTHROUGH_VARIABLES
CMAKE_C_COMPILER_TARGET
CMAKE_CXX_COMPILER_TARGET
- CMAKE_SHARED_LINKER_FLAGS
- CMAKE_MODULE_LINKER_FLAGS
- CMAKE_EXE_LINKER_FLAGS
CMAKE_INSTALL_PREFIX
CMAKE_MAKE_PROGRAM
CMAKE_LINKER
@@ -536,6 +533,10 @@
set(LIBCXX_C_FLAGS "${CMAKE_C_FLAGS} ${FLAGS_STRING}")
set(LIBCXX_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAGS_STRING}")
+ string(REPLACE "-Wl,-z,defs" "" LIBCXX_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
+ string(REPLACE "-Wl,-z,defs" "" LIBCXX_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}")
+ string(REPLACE "-Wl,-z,defs" "" LIBCXX_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
+
ExternalProject_Add(${name}
DEPENDS ${name}-clobber ${LIBCXX_DEPS}
PREFIX ${prefix}
@@ -546,6 +547,9 @@
${compiler_args}
-DCMAKE_C_FLAGS=${LIBCXX_C_FLAGS}
-DCMAKE_CXX_FLAGS=${LIBCXX_CXX_FLAGS}
+ -DCMAKE_SHARED_LINKER_FLAGS=${LIBCXX_SHARED_LINKER_FLAGS}
+ -DCMAKE_MODULE_LINKER_FLAGS=${LIBCXX_MODULE_LINKER_FLAGS}
+ -DCMAKE_EXE_LINKER_FLAGS=${LIBCXX_EXE_LINKER_FLAGS}
-DCMAKE_BUILD_TYPE=Release
-DLLVM_PATH=${LLVM_MAIN_SRC_DIR}
-DLLVM_BINARY_DIR=${prefix}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47865.150370.patch
Type: text/x-patch
Size: 1533 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180607/1cc10247/attachment.bin>
More information about the llvm-commits
mailing list