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
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -91,9 +91,17 @@ $ 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
+
### LTO
95
+
94
96
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
97
Don't set `FAT_LTO` when compiling the sysroot, though: only set `EMBED_LTO_BITCODE=1`.
96
98
99
+
Failing to set `EMBED_LTO_BITCODE` will give you the following error:
100
+
101
+
```
102
+
error: failed to copy bitcode to object file: No such file or directory (os error 2)
0 commit comments