Implement AsRef<Path>
for TargetSelection
· rust-lang/rust@1c0c2c3 (original) (raw)
`@@ -275,12 +275,8 @@ fn make_win_dist(
`
275
275
`}
`
276
276
``
277
277
`//Copy platform tools to platform-specific bin directory
`
278
``
`-
let target_bin_dir = plat_root
`
279
``
`-
.join("lib")
`
280
``
`-
.join("rustlib")
`
281
``
`-
.join(target.triple)
`
282
``
`-
.join("bin")
`
283
``
`-
.join("self-contained");
`
``
278
`+
let target_bin_dir =
`
``
279
`+
plat_root.join("lib").join("rustlib").join(target).join("bin").join("self-contained");
`
284
280
` fs::create_dir_all(&target_bin_dir).expect("creating target_bin_dir failed");
`
285
281
`for src in target_tools {
`
286
282
` builder.copy_link_to_folder(&src, &target_bin_dir);
`
`@@ -295,12 +291,8 @@ fn make_win_dist(
`
295
291
`);
`
296
292
``
297
293
`//Copy platform libs to platform-specific lib directory
`
298
``
`-
let target_lib_dir = plat_root
`
299
``
`-
.join("lib")
`
300
``
`-
.join("rustlib")
`
301
``
`-
.join(target.triple)
`
302
``
`-
.join("lib")
`
303
``
`-
.join("self-contained");
`
``
294
`+
let target_lib_dir =
`
``
295
`+
plat_root.join("lib").join("rustlib").join(target).join("lib").join("self-contained");
`
304
296
` fs::create_dir_all(&target_lib_dir).expect("creating target_lib_dir failed");
`
305
297
`for src in target_libs {
`
306
298
` builder.copy_link_to_folder(&src, &target_lib_dir);
`
`@@ -450,7 +442,7 @@ impl Step for Rustc {
`
450
442
`// component for now.
`
451
443
`maybe_install_llvm_runtime(builder, host, image);
`
452
444
``
453
``
`-
let dst_dir = image.join("lib/rustlib").join(&*host.triple).join("bin");
`
``
445
`+
let dst_dir = image.join("lib/rustlib").join(host).join("bin");
`
454
446
`t!(fs::create_dir_all(&dst_dir));
`
455
447
``
456
448
`// Copy over lld if it's there
`
`@@ -607,7 +599,7 @@ fn verify_uefi_rlib_format(builder: &Builder<'_>, target: TargetSelection, stamp
`
607
599
``
608
600
`` /// Copy stamped files into an image's target/lib
directory.
``
609
601
`fn copy_target_libs(builder: &Builder<'_>, target: TargetSelection, image: &Path, stamp: &Path) {
`
610
``
`-
let dst = image.join("lib/rustlib").join(target.triple).join("lib");
`
``
602
`+
let dst = image.join("lib/rustlib").join(target).join("lib");
`
611
603
`let self_contained_dst = dst.join("self-contained");
`
612
604
`t!(fs::create_dir_all(&dst));
`
613
605
`t!(fs::create_dir_all(&self_contained_dst));
`
`@@ -769,7 +761,7 @@ impl Step for Analysis {
`
769
761
``
770
762
`let src = builder
`
771
763
`.stage_out(compiler, Mode::Std)
`
772
``
`-
.join(target.triple)
`
``
764
`+
.join(target)
`
773
765
`.join(builder.cargo_dir())
`
774
766
`.join("deps")
`
775
767
`.join("save-analysis");
`
`@@ -2087,7 +2079,7 @@ fn maybe_install_llvm(
`
2087
2079
``
2088
2080
`/// Maybe add libLLVM.so to the target lib-dir for linking.
`
2089
2081
`pub fn maybe_install_llvm_target(builder: &Builder<'_>, target: TargetSelection, sysroot: &Path) {
`
2090
``
`-
let dst_libdir = sysroot.join("lib/rustlib").join(&*target.triple).join("lib");
`
``
2082
`+
let dst_libdir = sysroot.join("lib/rustlib").join(target).join("lib");
`
2091
2083
`// We do not need to copy LLVM files into the sysroot if it is not
`
2092
2084
`// dynamically linked; it is already included into librustc_llvm
`
2093
2085
`// statically.
`