File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -431,6 +431,25 @@ def _load_rustc_dev_nightly(ctx, target_triple):
431
431
432
432
return
433
433
434
+ def _load_llvm_tools (ctx , target_triple ):
435
+ """Loads the llvm tools
436
+
437
+ Args:
438
+ ctx: A repository_ctx.
439
+ target_triple: The rust-style target triple of the tool
440
+ """
441
+
442
+ load_arbitrary_tool (
443
+ ctx ,
444
+ iso_date = ctx .attr .iso_date ,
445
+ target_triple = target_triple ,
446
+ tool_name = "llvm-tools" ,
447
+ tool_subdirectories = ["llvm-tools-preview" ],
448
+ version = ctx .attr .version ,
449
+ )
450
+
451
+ return
452
+
434
453
def _rust_toolchain_repository_impl (ctx ):
435
454
"""The implementation of the rust toolchain repository rule."""
436
455
@@ -441,6 +460,10 @@ def _rust_toolchain_repository_impl(ctx):
441
460
if ctx .attr .rustfmt_version :
442
461
BUILD_components .append (_load_rustfmt (ctx ))
443
462
463
+ # Nightly Rust builds after 2020-05-22 need the llvm-tools gzip to get the libLLVM dylib
464
+ if ctx .attr .version == "nightly" and ctx .attr .iso_date > "2020-05-22" :
465
+ _load_llvm_tools (ctx , ctx .attr .exec_triple )
466
+
444
467
for target_triple in [ctx .attr .exec_triple ] + ctx .attr .extra_target_triples :
445
468
BUILD_components .append (_load_rust_stdlib (ctx , target_triple ))
446
469
You can’t perform that action at this time.
0 commit comments