-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Support computing layout of RPIT #14087
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
Conversation
r? @Veykril This is not a deep change in the type system. It just changes a |
@bors r+ |
let mut cmd = std::process::Command::new("rustc"); | ||
cmd.args(["-Z", "unstable-options", "--print", "target-spec-json"]).env("RUSTC_BOOTSTRAP", "1"); | ||
let output = cmd.output().unwrap(); | ||
assert!(output.status.success(), "{}", output.status); | ||
let stdout = String::from_utf8(output.stdout).unwrap(); | ||
let target_data_layout = | ||
stdout.split_once(r#""data-layout": ""#).unwrap().1.split_once('"').unwrap().0.to_owned(); |
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.
can you extract that to a function?
☀️ Test successful - checks-actions |
Reuse fetching target data layout from rustc function fix #14087
And some refactoring to make code more type safe.