Commit cd2dc91
authored
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`.1 parent 602e5df commit cd2dc91
File tree
6 files changed
+27
-21
lines changed- base
- contrib/juliac
- src
- test/trimming
6 files changed
+27
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1508 | 1508 | | |
1509 | 1509 | | |
1510 | 1510 | | |
1511 | | - | |
1512 | | - | |
| 1511 | + | |
1513 | 1512 | | |
1514 | | - | |
1515 | | - | |
| 1513 | + | |
1516 | 1514 | | |
1517 | 1515 | | |
1518 | 1516 | | |
| |||
1558 | 1556 | | |
1559 | 1557 | | |
1560 | 1558 | | |
1561 | | - | |
1562 | | - | |
| 1559 | + | |
1563 | 1560 | | |
1564 | 1561 | | |
1565 | 1562 | | |
| |||
1578 | 1575 | | |
1579 | 1576 | | |
1580 | 1577 | | |
1581 | | - | |
1582 | | - | |
1583 | 1578 | | |
1584 | 1579 | | |
1585 | 1580 | | |
1586 | 1581 | | |
1587 | 1582 | | |
1588 | 1583 | | |
1589 | 1584 | | |
1590 | | - | |
| 1585 | + | |
1591 | 1586 | | |
1592 | 1587 | | |
1593 | 1588 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
121 | 132 | | |
122 | 133 | | |
123 | 134 | | |
| |||
152 | 163 | | |
153 | 164 | | |
154 | 165 | | |
155 | | - | |
| 166 | + | |
156 | 167 | | |
157 | 168 | | |
158 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
208 | 208 | | |
209 | | - | |
| 209 | + | |
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
358 | | - | |
| 358 | + | |
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
0 commit comments