Skip to content

Commit 8c543af

Browse files
committed
Use build-script constraint to infer sysroot deps in toolchain
1 parent 3fc690b commit 8c543af

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

toolchains/BUCK

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ rust_toolchain(
3636
compiler = select({
3737
"rust//constraints:stage1": "rust//stage0:rustc",
3838
"rust//constraints:stage2": select({
39-
"rust//constraints:sysroot-deps=explicit": "rust//stage1:rustc",
40-
"rust//constraints:sysroot-deps=implicit": select({
41-
"rust//constraints:library": "rust//stage0:rustc",
42-
"rust//constraints:compiler": "rust//stage1:rustc",
39+
"rust//constraints:library": select({
40+
"DEFAULT": "rust//stage1:rustc",
41+
"rust//constraints:build-script": "rust//stage0:rustc",
4342
}),
43+
"rust//constraints:compiler": "rust//stage1:rustc",
4444
}),
4545
}),
4646
exec_compatible_with = [
@@ -71,33 +71,33 @@ rust_toolchain(
7171
"rust//constraints:stage2": "rust//stage1:rustdoc",
7272
}),
7373
sysroot = select({
74-
"rust//constraints:sysroot-deps=explicit": None,
75-
"rust//constraints:sysroot-deps=implicit": select({
76-
"rust//constraints:library": "rust//stage0:sysroot",
77-
"rust//constraints:compiler": select({
78-
"rust//constraints:stage1": dict(
79-
alloc = "rust//stage1:alloc",
80-
compiler_builtins = "rust//stage1:compiler_builtins",
81-
core = "rust//stage1:core",
82-
panic_abort = "rust//stage1:panic_abort",
83-
panic_unwind = "rust//stage1:panic_unwind",
84-
proc_macro = "rust//stage1:proc_macro",
85-
rust_allocator = "rust//stage1:rust_allocator",
86-
std = "rust//stage1:std",
87-
test = "rust//stage1:test",
88-
),
89-
"rust//constraints:stage2": dict(
90-
alloc = "rust//stage2:alloc",
91-
compiler_builtins = "rust//stage2:compiler_builtins",
92-
core = "rust//stage2:core",
93-
panic_abort = "rust//stage2:panic_abort",
94-
panic_unwind = "rust//stage2:panic_unwind",
95-
proc_macro = "rust//stage2:proc_macro",
96-
rust_allocator = "rust//stage2:rust_allocator",
97-
std = "rust//stage2:std",
98-
test = "rust//stage2:test",
99-
),
100-
}),
74+
"rust//constraints:library": select({
75+
"DEFAULT": None,
76+
"rust//constraints:build-script": "rust//stage0:sysroot",
77+
}),
78+
"rust//constraints:compiler": select({
79+
"rust//constraints:stage1": dict(
80+
alloc = "rust//stage1:alloc",
81+
compiler_builtins = "rust//stage1:compiler_builtins",
82+
core = "rust//stage1:core",
83+
panic_abort = "rust//stage1:panic_abort",
84+
panic_unwind = "rust//stage1:panic_unwind",
85+
proc_macro = "rust//stage1:proc_macro",
86+
rust_allocator = "rust//stage1:rust_allocator",
87+
std = "rust//stage1:std",
88+
test = "rust//stage1:test",
89+
),
90+
"rust//constraints:stage2": dict(
91+
alloc = "rust//stage2:alloc",
92+
compiler_builtins = "rust//stage2:compiler_builtins",
93+
core = "rust//stage2:core",
94+
panic_abort = "rust//stage2:panic_abort",
95+
panic_unwind = "rust//stage2:panic_unwind",
96+
proc_macro = "rust//stage2:proc_macro",
97+
rust_allocator = "rust//stage2:rust_allocator",
98+
std = "rust//stage2:std",
99+
test = "rust//stage2:test",
100+
),
101101
}),
102102
}),
103103
visibility = ["PUBLIC"],

0 commit comments

Comments
 (0)