[llvm] Remove -Wl, -z, defs linker flag when building shared libraries using llvm with emscripten (PR #123396)

Vassil Vassilev via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 17 13:10:30 PST 2025


================
@@ -309,15 +309,15 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
     message(WARNING "Build and install environment path info may be exposed; binaries will also be unrelocatable.")
   endif()
 endif()
-
+#ifndef EMSCRIPTEN
 # Pass -Wl,-z,defs. This makes sure all symbols are defined. Otherwise a DSO
 # build might work on ELF but fail on MachO/COFF.
 if(NOT (CMAKE_SYSTEM_NAME MATCHES "Darwin|FreeBSD|OpenBSD|DragonFly|AIX|OS390" OR
----------------
vgvassilev wrote:

There are too many `OR`s and `NOT`s for my brain but I think that's what you want.

https://github.com/llvm/llvm-project/pull/123396


More information about the llvm-commits mailing list