Skip to content

Commit 86d4cba

Browse files
committed
Add a false version of build-script constraint
1 parent 8c543af commit 86d4cba

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

constraints/BUCK

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ constraint(
3434

3535
constraint(
3636
setting = "build-script",
37+
values = [
38+
"build-script=false",
39+
"build-script=true",
40+
],
3741
)
3842

3943
constraint(

platforms/stage1/BUCK

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ platform(
44
name = "library",
55
base = "//platforms:host",
66
constraint_values = [
7+
"//constraints:build-script=false",
78
"//constraints:library",
89
"//constraints:opt-level=3",
910
"//constraints:stage1",
@@ -16,7 +17,7 @@ platform(
1617
name = "library-build-script",
1718
base = ":library",
1819
constraint_values = [
19-
"//constraints:build-script",
20+
"//constraints:build-script=true",
2021
"//constraints:opt-level=0",
2122
"//constraints:sysroot-deps=implicit",
2223
],
@@ -27,6 +28,7 @@ platform(
2728
name = "compiler",
2829
base = "//platforms:host",
2930
constraint_values = [
31+
"//constraints:build-script=false",
3032
"//constraints:compiler",
3133
"//constraints:opt-level=3",
3234
"//constraints:stage1",
@@ -39,7 +41,7 @@ platform(
3941
name = "compiler-build-script",
4042
base = ":compiler",
4143
constraint_values = [
42-
"//constraints:build-script",
44+
"//constraints:build-script=true",
4345
"//constraints:opt-level=0",
4446
],
4547
visibility = ["PUBLIC"],

platforms/stage2/BUCK

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ platform(
44
name = "library",
55
base = "//platforms:host",
66
constraint_values = [
7+
"//constraints:build-script=false",
78
"//constraints:library",
89
"//constraints:opt-level=3",
910
"//constraints:stage2",
@@ -16,7 +17,7 @@ platform(
1617
name = "library-build-script",
1718
base = ":library",
1819
constraint_values = [
19-
"//constraints:build-script",
20+
"//constraints:build-script=true",
2021
"//constraints:opt-level=0",
2122
"//constraints:sysroot-deps=implicit",
2223
],
@@ -27,6 +28,7 @@ platform(
2728
name = "compiler",
2829
base = "//platforms:host",
2930
constraint_values = [
31+
"//constraints:build-script=false",
3032
"//constraints:compiler",
3133
"//constraints:opt-level=3",
3234
"//constraints:stage2",
@@ -39,7 +41,7 @@ platform(
3941
name = "compiler-build-script",
4042
base = ":compiler",
4143
constraint_values = [
42-
"//constraints:build-script",
44+
"//constraints:build-script=true",
4345
"//constraints:opt-level=0",
4446
],
4547
visibility = ["PUBLIC"],

toolchains/BUCK

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ rust_toolchain(
3737
"rust//constraints:stage1": "rust//stage0:rustc",
3838
"rust//constraints:stage2": select({
3939
"rust//constraints:library": select({
40-
"DEFAULT": "rust//stage1:rustc",
41-
"rust//constraints:build-script": "rust//stage0:rustc",
40+
"rust//constraints:build-script=false": "rust//stage1:rustc",
41+
"rust//constraints:build-script=true": "rust//stage0:rustc",
4242
}),
4343
"rust//constraints:compiler": "rust//stage1:rustc",
4444
}),
@@ -72,8 +72,8 @@ rust_toolchain(
7272
}),
7373
sysroot = select({
7474
"rust//constraints:library": select({
75-
"DEFAULT": None,
76-
"rust//constraints:build-script": "rust//stage0:sysroot",
75+
"rust//constraints:build-script=false": None,
76+
"rust//constraints:build-script=true": "rust//stage0:sysroot",
7777
}),
7878
"rust//constraints:compiler": select({
7979
"rust//constraints:stage1": dict(

0 commit comments

Comments
 (0)