julia
cd2dc914 - Use -force_load, rather than -all_load, on ld64 (macOS) (#60160)

Commit
47 days ago
Use -force_load, rather than -all_load, on ld64 (macOS) (#60160) We have been using ld64's `-all_load` as the mac equivalent to `--whole-archive`, but `-force_load` does something closer to what we want. From the ld64 man page: ``` -all_load Loads all members of static archive libraries. -force_load path_to_archive Loads all members of the specified static archive library. Note: -all_load forces all members of all archives to be loaded. This option allows you to target a specific archive. ``` When we link `libjulia-internal.dylib` and `libjulia-codegen.dylib` with `-all_load`, we pull in more of the static LLVM support libraries than we need. Before: ``` 5.1M usr/lib/libjulia-internal.1.14.0.dylib 2.1M usr/lib/libjulia-codegen.1.14.0.dylib ``` After: ``` 3.8M usr/lib/libjulia-internal.1.14.0.dylib 2.1M usr/lib/libjulia-codegen.1.14.0.dylib ``` Also adds `Base.Linking.whole_archive`.
Author
Parents
Loading