-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
README: document more building tricks #270
Changes from all commits
19da861
d715baf
c588770
9953c46
8131521
5930607
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
use std::process::exit; | ||
|
||
use version_check::Version; | ||
|
||
fn main() { | ||
if !version_check::is_max_version("1.67.1").unwrap_or(false) { | ||
eprintln!("Rust 1.68 and newer are not supported yet, as they require LLVM 16 or newer."); | ||
eprintln!("You have: {}", Version::read().unwrap()); | ||
eprintln!( | ||
"For more information, see https://github.com/trailofbits/siderophile/issues/267" | ||
); | ||
exit(1) | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[toolchain] | ||
channel = "1.67" | ||
profile = "default" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,14 +86,14 @@ pub struct CallGraph { | |
#[allow(clippy::missing_panics_doc, clippy::expect_used, clippy::unwrap_used)] | ||
pub fn configure_rustup_toolchain() { | ||
let rsup_default = Command::new("rustup") | ||
.arg("default") | ||
.args(["show", "active-toolchain"]) | ||
.output() | ||
.expect("failed to run rustup to configure toolchain"); | ||
let utf8_toolchain = std::str::from_utf8(&rsup_default.stdout) | ||
Comment on lines
88
to
92
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We now use |
||
.unwrap() | ||
.trim_end() | ||
.strip_suffix(" (default)") | ||
.unwrap(); | ||
.split_once(' ') | ||
.unwrap() | ||
.0; | ||
env::set_var("RUSTUP_TOOLCHAIN", utf8_toolchain); | ||
|
||
let rustc_version = rustc_version::version_meta().unwrap(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unfortunate, but IMO produces a better user experience than our current one: the current UX is that
cargo build
orcargo install
will complete successfully, but will fail to analyze any IR produced by versions ofrustc
newer than1.67
.