Commit 88c90ca
authored
Fix various issues with PGO+LTO makefile (#55581)
This fixes various issues with the PGO+LTO makefile
- `USECCACHE` doesn't work throwing an error at
https://github.com/JuliaLang/julia/blob/eb5587dac02d1f6edf486a71b95149139cc5d9f7/Make.inc#L734
This is because setting `CC` and `CCX` by passing them as arguments to
`make` prevents `Make.inc` from prepending these variables with `ccache`
as `Make.inc` doesn't use override. To workaround this I instead set
`USECLANG` and add the toolchain to the `PATH`.
- To deal with similar issues for the other make flags, I pass them as
environment variables which can be edited in `Make.inc`.
- I add a way to build in one go by creating the `all` target, now you
can just run `make` and a PGO+LTO build that profiles Julia's build will
be generated.
- I workaround `PROFRAW_FILES` not being reevaluated after `stage1`
builds, this caused the generation of `PROFILE_FILE` to run an outdated
command if `stage1` was built and affected the profraw files. This is
important when building in one go.
- I add a way to run rules like `binary-dist` which are not defined in
this makefile with the correct toolchain which for example prevents
`make binary-dist` from unnecessarily rebuilding `sys.ji`.
- Include `-Wl,--undefined-version` till
#54533 gets fixed.
These changes need to be copied to the PGO+LTO+BOLT makefile and some to
the BOLT makefile in a later pr.
---------
Co-authored-by: Zentrik <Zentrik@users.noreply.github.com>1 parent 68feddc commit 88c90ca
1 file changed
+18
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 51 | | |
56 | | - | |
| 52 | + | |
| 53 | + | |
57 | 54 | | |
58 | 55 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | 56 | | |
64 | | - | |
| 57 | + | |
| 58 | + | |
65 | 59 | | |
66 | | - | |
67 | | - | |
| 60 | + | |
| 61 | + | |
68 | 62 | | |
69 | | - | |
70 | | - | |
| 63 | + | |
| 64 | + | |
71 | 65 | | |
72 | 66 | | |
73 | 67 | | |
| |||
0 commit comments