|
1 | 1 | load(":known_shas.bzl", "FILE_KEY_TO_SHA")
|
2 |
| -load(":triple_mappings.bzl", "triple_to_system", "triple_to_constraint_set", "system_to_binary_ext", "system_to_dylib_ext", "system_to_staticlib_ext") |
| 2 | +load(":triple_mappings.bzl", "system_to_binary_ext", "system_to_dylib_ext", "system_to_staticlib_ext", "triple_to_constraint_set", "triple_to_system") |
3 | 3 |
|
4 | 4 | DEFAULT_TOOLCHAIN_NAME_PREFIX = "toolchain_for"
|
5 | 5 |
|
| 6 | +def rust_repositories(): |
| 7 | + """Emits a default set of toolchains for Linux, OSX, and Freebsd |
| 8 | +
|
| 9 | + Skip this macro and call the `rust_repository_set` macros directly if you need a compiler for |
| 10 | + other hosts or for additional target triples. |
| 11 | + """ |
| 12 | + |
| 13 | + rust_repository_set( |
| 14 | + name = "rust_linux_x86_64", |
| 15 | + exec_triple = "x86_64-unknown-linux-gnu", |
| 16 | + extra_target_triples = [], |
| 17 | + version = "1.27.2", |
| 18 | + ) |
| 19 | + |
| 20 | + rust_repository_set( |
| 21 | + name = "rust_darwin_x86_64", |
| 22 | + exec_triple = "x86_64-apple-darwin", |
| 23 | + extra_target_triples = [], |
| 24 | + version = "1.27.2", |
| 25 | + ) |
| 26 | + |
| 27 | + rust_repository_set( |
| 28 | + name = "rust_freebsd_x86_64", |
| 29 | + exec_triple = "x86_64-unknown-freebsd", |
| 30 | + extra_target_triples = [], |
| 31 | + version = "1.27.2", |
| 32 | + ) |
| 33 | + |
6 | 34 | def _check_version_valid(version, iso_date, param_prefix = ""):
|
7 | 35 | """Verifies that the provided rust version and iso_date make sense."""
|
8 | 36 |
|
@@ -366,31 +394,3 @@ def rust_repository_set(name, version, exec_triple, extra_target_triples, iso_da
|
366 | 394 |
|
367 | 395 | # Register toolchains
|
368 | 396 | native.register_toolchains(*all_toolchain_names)
|
369 |
| - |
370 |
| -def rust_repositories(): |
371 |
| - """Emits a default set of toolchains for Linux, OSX, and Freebsd |
372 |
| -
|
373 |
| - Skip this macro and call the `rust_repository_set` macros directly if you need a compiler for |
374 |
| - other hosts or for additional target triples. |
375 |
| - """ |
376 |
| - |
377 |
| - rust_repository_set( |
378 |
| - name = "rust_linux_x86_64", |
379 |
| - exec_triple = "x86_64-unknown-linux-gnu", |
380 |
| - extra_target_triples = [], |
381 |
| - version = "1.26.1", |
382 |
| - ) |
383 |
| - |
384 |
| - rust_repository_set( |
385 |
| - name = "rust_darwin_x86_64", |
386 |
| - exec_triple = "x86_64-apple-darwin", |
387 |
| - extra_target_triples = [], |
388 |
| - version = "1.26.1", |
389 |
| - ) |
390 |
| - |
391 |
| - rust_repository_set( |
392 |
| - name = "rust_freebsd_x86_64", |
393 |
| - exec_triple = "x86_64-unknown-freebsd", |
394 |
| - extra_target_triples = [], |
395 |
| - version = "1.26.1", |
396 |
| - ) |
0 commit comments