Skip to content

Commit 5159e8c

Browse files
authored
fix(orion): skip incompatible targets for buck2 builds (#1885)
Signed-off-by: jerry609 <1772030600@qq.com>
1 parent 029e066 commit 5159e8c

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

orion/buck/run.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ pub fn targets_arguments() -> &'static [&'static str] {
200200
&[
201201
"targets",
202202
"//...",
203+
"--target-platforms",
204+
"prelude//platforms:default",
203205
"--streaming",
204206
"--keep-going",
205207
"--no-cache",

orion/src/buck_controller.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,9 @@ pub async fn build(
689689
.args(&targets)
690690
.arg("--target-platforms")
691691
.arg("prelude//platforms:default")
692+
// Avoid failing the whole build when a target is explicitly incompatible
693+
// with the selected platform (e.g., macOS-only crates on Linux builders).
694+
.arg("--skip-incompatible-targets")
692695
.arg("--verbose=2")
693696
.current_dir(mount_point)
694697
.stdout(Stdio::piped())

0 commit comments

Comments
 (0)