Skip to content

Commit

Permalink
Fix cc sysroot path and target for morello linux in bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
lewis-revill committed Jan 15, 2024
1 parent 5d4dced commit 381c48d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1752,7 +1752,7 @@ impl<'a> Builder<'a> {
rustflags.arg("-Clink-args=-march=morello+c64");
rustflags.arg("-Clink-args=-mabi=purecap");
let sysroot = match home_dir() {
Some(path) => path.as_path().join("cheri").join("output").join("musl-bin"),
Some(path) => path.as_path().join("morello").join("musl"),
None => Path::new("").to_path_buf(),
};
let sysroot = sysroot.into_os_string().into_string().unwrap();
Expand Down
3 changes: 2 additions & 1 deletion src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1088,8 +1088,9 @@ impl Build {
base.push(format!("--sysroot={}", sysroot));
}
if &*target.triple == "morello-unknown-linux-purecap" {
base.push("--target=aarch64-unknown-linux-musl_purecap".into());
let sysroot = match home_dir() {
Some(path) => path.as_path().join("cheri").join("output").join("musl-bin"),
Some(path) => path.as_path().join("morello").join("musl"),
None => Path::new("").to_path_buf(),
};
let sysroot = sysroot.into_os_string().into_string().unwrap();
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ impl Step for TestHelpers {
}
if self.target == "morello-unknown-linux-purecap" {
let sysroot = match home_dir() {
Some(path) => path.as_path().join("cheri").join("output").join("musl-bin"),
Some(path) => path.as_path().join("morello").join("musl"),
None => Path::new("").to_path_buf(),
};
let sysroot = sysroot.into_os_string().into_string().unwrap();
Expand Down

0 comments on commit 381c48d

Please sign in to comment.