Skip to content

Commit

Permalink
riscv on stable
Browse files Browse the repository at this point in the history
  • Loading branch information
burrbull authored and jessebraham committed Nov 3, 2024
1 parent 5e45428 commit 498539c
Showing 1 changed file with 38 additions and 13 deletions.
51 changes: 38 additions & 13 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,19 +269,44 @@ fn build_package(workspace: &Path, chip: &Chip) -> Result<()> {
let target = build_target(&path)?;

log::info!("building PAC using '{channel}' channel and targeting '{target}'");
Command::new("cargo")
.args([
&format!("+{channel}"),
"build",
"-Z",
"build-std=core",
"--target",
&target,
])
.current_dir(path)
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
.output()?;

if target.starts_with("riscv") {
Command::new("rustup")
.args([
"target",
"add",
&target,
])
.current_dir(&path)
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
.output()?;
Command::new("cargo")
.args([
&format!("+{channel}"),
"build",
"--target",
&target,
])
.current_dir(path)
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
.output()?;
} else {
Command::new("cargo")
.args([
&format!("+{channel}"),
"build",
"-Z",
"build-std=core",
"--target",
&target,
])
.current_dir(path)
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
.output()?;
}

Ok(())
}
Expand Down

0 comments on commit 498539c

Please sign in to comment.