forked from conjure-cp/conjure-oxide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In recent versions of the nightly / beta compilers, the use of linkme causes linker errors. (dtolnay/linkme#94) This is due to the new linker set as default in these versions. Add linker flags to nightly builds to revert to the old linker behaviour. See: - dtolnay/linkme#88 - https://blog.rust-lang.org/2024/05/17/enabling-rust-lld-on-linux.html
- Loading branch information
1 parent
1cc0853
commit 4b14701
Showing
5 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use rustc_version::{version_meta, Channel}; | ||
fn main() { | ||
// Linkme does not (currently) work using the linker provided by nightly/beta Rust. | ||
// See: https://github.com/dtolnay/linkme/pull/88, | ||
// https://blog.rust-lang.org/2024/05/17/enabling-rust-lld-on-linux.html | ||
// | ||
// This should eventually be fixed in linkme, making this code redundant: | ||
// https://github.com/dtolnay/linkme/issues/94 | ||
// | ||
// --niklasdewally | ||
#[allow(clippy::unwrap_used)] | ||
match version_meta().unwrap().channel { | ||
Channel::Stable => {} | ||
_ => { | ||
println!("cargo::rustc-link-arg=-Wl,-z,nostart-stop-gc") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use rustc_version::{version_meta, Channel}; | ||
fn main() { | ||
// Linkme does not (currently) work using the linker provided by nightly/beta Rust. | ||
// See: https://github.com/dtolnay/linkme/pull/88, | ||
// https://blog.rust-lang.org/2024/05/17/enabling-rust-lld-on-linux.html | ||
// | ||
// This should eventually be fixed in linkme, making this code redundant: | ||
// https://github.com/dtolnay/linkme/issues/94 | ||
// | ||
// --niklasdewally | ||
#[allow(clippy::unwrap_used)] | ||
match version_meta().unwrap().channel { | ||
Channel::Stable => {} | ||
_ => { | ||
println!("cargo::rustc-link-arg=-Wl,-z,nostart-stop-gc") | ||
} | ||
} | ||
} |