diff --git a/cmake/targets/BuildBun.cmake b/cmake/targets/BuildBun.cmake index da416f67db..9e64330a73 100644 --- a/cmake/targets/BuildBun.cmake +++ b/cmake/targets/BuildBun.cmake @@ -1045,7 +1045,6 @@ if(APPLE) -Wl,-no_compact_unwind -Wl,-stack_size,0x1200000 -fno-keep-static-consts - -Wl,-map,${bun}.linker-map ) if(DEBUG) @@ -1065,6 +1064,7 @@ if(APPLE) target_link_options(${bun} PUBLIC -dead_strip -dead_strip_dylibs + -Wl,-map,${bun}.linker-map ) endif() endif() @@ -1126,7 +1126,6 @@ if(LINUX) -Wl,--sort-section=name -Wl,--hash-style=both -Wl,--build-id=sha1 # Better for debugging than default - -Wl,-Map=${bun}.linker-map ) # don't strip in debug, this seems to be needed so that the Zig std library @@ -1141,6 +1140,7 @@ if(LINUX) if (NOT DEBUG AND NOT ENABLE_ASAN AND NOT ENABLE_VALGRIND) target_link_options(${bun} PUBLIC -Wl,-icf=safe + -Wl,-Map=${bun}.linker-map ) endif()