From ca4ab5c9124e270fda68b6abd47ba59ac8fb85a4 Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: Wed, 14 Jun 2023 18:16:54 +0200 Subject: [PATCH] Cargo: set LTO option to false == thin-local Gentoo ebuild of Rust 1.70 started showing different behavior w.r.t. LTO. That makes builds fail like: ``` rustc: .../InstructionPrecedenceTracking.cpp:97: void llvm::InstructionPrecedenceTracking::validate(const llvm::BasicBlock*) const: Assertion `It->second == nullptr && "Block is marked as having special instructions but in fact it has " "none!"' failed. error: could not compile `update-ssh-keys` (bin "update-ssh-keys") ``` Changing `lto = true` to `lto = false` (a.k.a. "thin-local") in `Cargo.toml` makes the build failure disappear. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1ff4f81..1ac2081 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ path = "src/lib.rs" doc = true [profile.release] -lto = true +lto = false [package.metadata.release] sign-commit = true