File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2704,8 +2704,12 @@ impl BuildRequest {
27042704
27052705 // Preserve the original args. We only preserve:
27062706 // -L <path>
2707- // -arch
27082707 // -lxyz
2708+ // -m (arch/emulation)
2709+ // -B<path> (gcc program search path — Rust 1.86+ injects -B/gcc-ld + -fuse-ld=lld
2710+ // so that cc picks up the bundled lld; we must forward it for the patch
2711+ // linker invocation too, otherwise cc falls back to the system `ld`)
2712+ // -fuse-ld (linker selection)
27092713 // There might be more, but some flags might break our setup.
27102714 for ( idx, arg) in original_args. iter ( ) . enumerate ( ) {
27112715 if * arg == "-L" {
@@ -2718,6 +2722,7 @@ impl BuildRequest {
27182722 || arg. starts_with ( "-Wl,--target=" )
27192723 || arg. starts_with ( "-Wl,-fuse-ld" )
27202724 || arg. starts_with ( "-fuse-ld" )
2725+ || arg. starts_with ( "-B" )
27212726 || arg. contains ( "-ld-path" )
27222727 {
27232728 out_args. push ( arg. to_string ( ) ) ;
You can’t perform that action at this time.
0 commit comments