You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Readme.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,7 +91,8 @@ $ CHANNEL="release" $CG_GCCJIT_DIR/cargo.sh run
91
91
92
92
If you compiled cg_gccjit in debug mode (aka you didn't pass `--release` to `./test.sh`) you should use `CHANNEL="debug"` instead or omit `CHANNEL="release"` completely.
93
93
94
-
To use LTO, you need to set the variable `FAT_LTO` in addition to setting `lto = "fat"` in the `Cargo.toml`.
94
+
To use LTO, you need to set the variable `FAT_LTO=1` and `EMBED_LTO_BITCODE=1` in addition to setting `lto = "fat"` in the `Cargo.toml`.
95
+
Don't set `FAT_LTO` when compiling the sysroot, though: only set `EMBED_LTO_BITCODE=1`.
95
96
96
97
### Rustc
97
98
@@ -202,11 +203,11 @@ error: failed to build archive: failed to open object file: No such file or dire
202
203
```
203
204
204
205
That can be caused by the fact that you try to compile with `lto = "fat"`, but you didn't compile the sysroot with LTO.
205
-
TODO: check this ^ .
206
+
(Not sure if that's the reason since I cannot reproduce anymore. Maybe it happened when forgetting setting `FAT_LTO`.)
206
207
207
208
### How to debug GCC LTO
208
209
209
-
Run do the command with `-v -save-temps` and then extract the `lto1` line from the output and run that under the debugger
210
+
Run do the command with `-v -save-temps` and then extract the `lto1` line from the output and run that under the debugger.
0 commit comments