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

Asiri Rathnayake via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 27 07:48:03 PDT 2016


rmaprath 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")
----------------
zlei wrote:
> 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?
Sure, I'll do a patch.

Btw, I think this configuration is better placed in `HandleOutOfTreeLLVM.cmake` module.

I'll see if I can find a better way to do this.


Repository:
  rL LLVM

https://reviews.llvm.org/D24119





More information about the cfe-commits mailing list