[PATCH] D24119: [libc++] add linker option "-Wl, -z, defs" in standalone build

Lei Zhang via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 27 07:24:55 PDT 2016


zlei added inline comments.

================
Comment at: libcxx/trunk/CMakeLists.txt:329
@@ +328,3 @@
+          ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") AND
+     NOT LLVM_USE_SANITIZER)
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
----------------
rmaprath wrote:
> Perhaps we should exclude `LIBCXX_HAS_EXTERNAL_THREAD_API` as well? Because there we explicitly strip off these flags.
I agree. Could you prepare a patch for it?

BTW, I really don't like duplicating code snippet from llvm. Is there any better solution for that?


Repository:
  rL LLVM

https://reviews.llvm.org/D24119





More information about the cfe-commits mailing list