ld: warning: static initializer found in '...Objects-normal/x86_64/UnifiedSource85.o'. Use -no_inits to make this an error. Use -no_warn_inits to suppress warning These warnings here have hidden a real problem: ld: warning: static initializer found in '/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource85.o'. Use -no_inits to make this an error. Use -no_warn_inits to suppress warning ld: warning: static initializer found in '/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource133.o'. Use -no_inits to make this an error. Use -no_warn_inits to suppress warning ld: warning: static initializer found in '/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource136.o'. Use -no_inits to make this an error. Use -no_warn_inits to suppress warning ld: warning: static initializer found in '/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource156.o'. Use -no_inits to make this an error. Use -no_warn_inits to suppress warning ld: warning: static initializer found in '/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource217.o'. Use -no_inits to make this an error. Use -no_warn_inits to suppress warning ld: warning: static initializer found in '/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource220.o'. Use -no_inits to make this an error. Use -no_warn_inits to suppress warning ld: warning: static initializer found in '/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource229.o'. Use -no_inits to make this an error. Use -no_warn_inits to suppress warning ld: warning: static initializer found in '/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource231.o'. Use -no_inits to make this an error. Use -no_warn_inits to suppress warning ld: warning: static initializer found in '/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource309.o'. Use -no_inits to make this an error. Use -no_warn_inits to suppress warning ld: warning: static initializer found in '/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource319.o'. Use -no_inits to make this an error. Use -no_warn_inits to suppress warning ld: warning: static initializer found in '/Users/kkinnunen/Build/WebCore.build/Debug-maccatalyst/WebCore.build/Objects-normal/x86_64/UnifiedSource374.o'. Use -no_inits to make this an error. Use -no_warn_inits to suppress warning ld: warning: invalid -install_name (@loader_path/../../../libANGLE-shared.dylib) in dependent dylib (/Users/kkinnunen/Build/Debug-maccatalyst/libANGLE-shared.dylib). Dylibs/frameworks which might go in dyld shared cache cannot link with dylib that uses @rpath, @loader_path, etc. ld: warning: linking with (/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio) but not using any symbols from it ld: warning: linking with (/System/Library/PrivateFrameworks/URLFormatting.framework/Versions/A/URLFormatting) but not using any symbols from it ld: warning: linking with (/usr/lib/libAccessibility.dylib) but not using any symbols from it Note: the part about libANGLE-shared.dylib is a real bug, but it's hidden in the the no inits warning. Maybe the warning should be removed if it has no other purpose than being ignored? Most of these probably are RefCountedLeakCounter. Should I change that to not warn?
Static initializers are not allowed in WebKit for performance reasons. So this is a real bug too.
(In reply to Alexey Proskuryakov from comment #1) > Static initializers are not allowed in WebKit for performance reasons. So > this is a real bug too. There's an exception of "Debug build in these specific files defined by check-global-initializers"
<rdar://problem/77013991>