Skip to content

Commit 81a2e11

Browse files
committed
Add comment
1 parent 71febd9 commit 81a2e11

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Readme.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,17 @@ $ CHANNEL="release" $CG_GCCJIT_DIR/cargo.sh run
9191

9292
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.
9393

94+
### LTO
95+
9496
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`.
9597
Don't set `FAT_LTO` when compiling the sysroot, though: only set `EMBED_LTO_BITCODE=1`.
9698

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)
103+
```
104+
97105
### Rustc
98106

99107
> You should prefer using the Cargo method.

0 commit comments

Comments
 (0)