Skip to content

Commit 15668dd

Browse files
jcpetruzzafacebook-github-bot
authored andcommitted
Update erlang toolchain definition
Summary: # Context Several changes are happening in the definition of Erlang changes in buck2. In particular, the multi-version toolchains are being phased out. # Problem This project is using the old definitions # This diff Updated the toolchains/BUCK file to use the new versions Reviewed By: michalmuskala Differential Revision: D78273665 fbshipit-source-id: 09986942a2ed9f12e9a214f97f5a32c6e6586722
1 parent 1a5380c commit 15668dd

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

toolchains/BUCK

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
load("@prelude//toolchains:genrule.bzl", "system_genrule_toolchain")
1616
load(
1717
"@prelude//erlang:erlang_toolchain.bzl",
18-
"config_erlang_toolchain_rule",
19-
"get_primary_tools",
20-
"multi_version_toolchain_rule",
18+
"erlang_toolchain",
2119
)
2220

2321
system_genrule_toolchain(
@@ -34,7 +32,7 @@ erlang_otp_binaries(
3432
)
3533

3634

37-
config_erlang_toolchain_rule(
35+
erlang_toolchain(
3836
name="erlang-local",
3937
otp_binaries=":local",
4038
visibility=["PUBLIC"],
@@ -44,7 +42,7 @@ config_erlang_toolchain_rule(
4442
parse_transforms=[],
4543
)
4644

47-
config_erlang_toolchain_rule(
45+
erlang_toolchain(
4846
name="erlang-taint",
4947
otp_binaries=":local",
5048
visibility=["PUBLIC"],
@@ -54,7 +52,7 @@ config_erlang_toolchain_rule(
5452
parse_transforms=["root//:finer_taint_compiler"],
5553
)
5654

57-
config_erlang_toolchain_rule(
55+
erlang_toolchain(
5856
name="erlang-online-taint",
5957
otp_binaries=":local",
6058
visibility=["PUBLIC"],
@@ -78,14 +76,14 @@ platform(name="default", constraint_values=[":no"])
7876
platform(name="finer-taint-mode", constraint_values=[":finer_taint"])
7977
platform(name="online-finer-taint-mode", constraint_values=[":online_finer_taint"])
8078

81-
multi_version_toolchain_rule(
79+
native.toolchain_alias(
8280
name="erlang-default",
83-
targets=select(
81+
actual=select(
8482
{
85-
":notaint-set": [":erlang-local", ":erlang-taint"],
86-
":finer-taint-set": [":erlang-taint"],
87-
":online-finer-taint-set": [":erlang-online-taint"],
88-
"DEFAULT": [":erlang-local"],
83+
":notaint-set": ":erlang-local",
84+
":finer-taint-set": ":erlang-taint",
85+
":online-finer-taint-set": ":erlang-online-taint",
86+
"DEFAULT": ":erlang-local",
8987
}
9088
),
9189
visibility=["PUBLIC"],

0 commit comments

Comments
 (0)