File tree 2 files changed +18
-0
lines changed
src/bootstrap/src/core/build_steps
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -1965,6 +1965,16 @@ impl Step for Assemble {
1965
1965
}
1966
1966
}
1967
1967
1968
+ {
1969
+ // `llvm-strip` is used by rustc, which is actually just a symlink to `llvm-objcopy`,
1970
+ // so copy and rename `llvm-objcopy` and create link for `rust-strip`
1971
+ let src_exe = exe ( "llvm-objcopy" , target_compiler. host ) ;
1972
+ let dst_exe = exe ( "rust-objcopy" , target_compiler. host ) ;
1973
+ builder. copy_link ( & libdir_bin. join ( src_exe) , & libdir_bin. join ( dst_exe) ) ;
1974
+ let dst_exe = exe ( "rust-strip" , target_compiler. host ) ;
1975
+ t ! ( builder. symlink_file( "rust-objcopy" , & libdir_bin. join( dst_exe) ) ) ;
1976
+ }
1977
+
1968
1978
// In addition to `rust-lld` also install `wasm-component-ld` when
1969
1979
// LLD is enabled. This is a relatively small binary that primarily
1970
1980
// delegates to the `rust-lld` binary for linking and then runs
Original file line number Diff line number Diff line change @@ -473,6 +473,14 @@ impl Step for Rustc {
473
473
) ;
474
474
}
475
475
}
476
+
477
+ {
478
+ let src_dir = builder. sysroot_libdir ( compiler, host) . parent ( ) . unwrap ( ) . join ( "bin" ) ;
479
+ let llvm_objcopy = exe ( "llvm-objcopy" , compiler. host ) ;
480
+ let rust_objcopy = exe ( "rust-objcopy" , compiler. host ) ;
481
+ builder. copy_link ( & src_dir. join ( & llvm_objcopy) , & dst_dir. join ( & rust_objcopy) ) ;
482
+ }
483
+
476
484
if builder. tool_enabled ( "wasm-component-ld" ) {
477
485
let src_dir = builder. sysroot_libdir ( compiler, host) . parent ( ) . unwrap ( ) . join ( "bin" ) ;
478
486
let ld = exe ( "wasm-component-ld" , compiler. host ) ;
You can’t perform that action at this time.
0 commit comments