Commit 4aaa6de
authored
Allow specifying exec and target compatibility constraints (#1971)
Extra target triples may only be appropriate for specific platforms
(e.g. if you register a toolchain with the exec_triple
`x86_64-unknown-linux-gnu` with an extra target triple of
`x86_64-unknown-linux-musl`, you may want differing
`target_compatible_with` values for each of those two target triples.
This allows for specifying explicit `exec_compatible_with` lists per
toolchain (which was already supported by `rust_toolchain_repository`
just not proxied by `rust_repository_set`), and explicit
`target_compatible_with` lists, both for the default triple and for
extra ones.
I'm not 100% sure on our pre-existing assumption that every toolchain
supports compiling targeting its own exec platform, i.e. the
'`[exec_triple]`' part of https://github.com/bazelbuild/rules_rust/blob/937e63399b111a6d7ee53b187e4d113300b089e9/rust/repositories.bzl#L845
but it _does_ generally hold, and supplying a way of removing that
default assumption is definitely a separate PR for another day if it
becomes relevant to anyone.1 parent f1b19c3 commit 4aaa6de
3 files changed
+31
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1851 | 1851 | | |
1852 | 1852 | | |
1853 | 1853 | | |
1854 | | - | |
| 1854 | + | |
1855 | 1855 | | |
1856 | 1856 | | |
1857 | 1857 | | |
| |||
1868 | 1868 | | |
1869 | 1869 | | |
1870 | 1870 | | |
1871 | | - | |
| 1871 | + | |
1872 | 1872 | | |
1873 | 1873 | | |
1874 | 1874 | | |
| |||
1879 | 1879 | | |
1880 | 1880 | | |
1881 | 1881 | | |
| 1882 | + | |
| 1883 | + | |
1882 | 1884 | | |
1883 | 1885 | | |
1884 | 1886 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | | - | |
| 323 | + | |
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
| 334 | + | |
| 335 | + | |
334 | 336 | | |
335 | 337 | | |
336 | 338 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
881 | 881 | | |
882 | 882 | | |
883 | 883 | | |
884 | | - | |
| 884 | + | |
885 | 885 | | |
886 | 886 | | |
887 | 887 | | |
| |||
891 | 891 | | |
892 | 892 | | |
893 | 893 | | |
894 | | - | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
895 | 897 | | |
896 | 898 | | |
897 | 899 | | |
| |||
905 | 907 | | |
906 | 908 | | |
907 | 909 | | |
908 | | - | |
909 | | - | |
| 910 | + | |
| 911 | + | |
910 | 912 | | |
911 | 913 | | |
912 | 914 | | |
| |||
923 | 925 | | |
924 | 926 | | |
925 | 927 | | |
| 928 | + | |
| 929 | + | |
926 | 930 | | |
927 | 931 | | |
928 | 932 | | |
| |||
942 | 946 | | |
943 | 947 | | |
944 | 948 | | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
945 | 954 | | |
946 | | - | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
947 | 963 | | |
948 | 964 | | |
949 | 965 | | |
| |||
962 | 978 | | |
963 | 979 | | |
964 | 980 | | |
| 981 | + | |
| 982 | + | |
965 | 983 | | |
966 | 984 | | |
967 | 985 | | |
| |||
0 commit comments