Commit dc0a6e5
committed
Use -force_load, rather than -all_load, on ld64 (macOS)
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
```1 parent 4060c45 commit dc0a6e5
2 files changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1508 | 1508 | | |
1509 | 1509 | | |
1510 | 1510 | | |
1511 | | - | |
| 1511 | + | |
1512 | 1512 | | |
1513 | 1513 | | |
1514 | 1514 | | |
| |||
1578 | 1578 | | |
1579 | 1579 | | |
1580 | 1580 | | |
1581 | | - | |
1582 | | - | |
1583 | 1581 | | |
1584 | 1582 | | |
1585 | 1583 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
0 commit comments