Skip to content

Commit 6796a0b

Browse files
committed
Cargo: Change lto option to "thin"
A recent version of nightly rust gets the following link error: error: failed to get bitcode from object file for LTO (Bitcode section not found in object file) This issue can be fixed by supplying `-C linker-plugin-lto` and set lto option to "thin"[1]. [1] hermit-os/hermit-rs#15 Signed-off-by: Akira Moroo <[email protected]>
1 parent 5a1412f commit 6796a0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ edition = "2018"
88
# needed here to make "cargo check" and "cargo clippy" run without errors.
99
[profile.dev]
1010
panic = "abort"
11-
lto = true
11+
lto = "thin"
1212

1313
[profile.release]
1414
panic = "abort"
15-
lto = true
15+
lto = "thin"
1616

1717
[features]
1818
default = ["log-serial", "log-panic"]

0 commit comments

Comments
 (0)