--- swift/tools/libStaticMirror/CMakeLists.txt.orig	2025-12-09 23:45:54 UTC
+++ swift/tools/libStaticMirror/CMakeLists.txt
@@ -20,6 +20,8 @@ target_link_libraries(libStaticMirror PRIVATE
     swiftStaticMirror
     swiftRemoteInspection)
 
+target_link_options(libStaticMirror PRIVATE "SHELL:-Xlinker -z" "SHELL:-Xlinker nostart-stop-gc")
+
 set_target_properties(libStaticMirror
     PROPERTIES
     OUTPUT_NAME ${SWIFT_SCAN_LIB_NAME})
