Skip to content

Commit 16eada4

Browse files
committed
Debug
1 parent 442e3cf commit 16eada4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/rustc_codegen_ssa/src/back/linker.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,10 @@ fn link_args<L: Linker + ?Sized>(
200200
/// Arguments for the cc wrapper specifically.
201201
/// Check that it's indeed a cc wrapper and pass verbatim.
202202
fn cc_args<L: Linker + ?Sized>(l: &mut L, args: impl IntoIterator<Item: AsRef<OsStr>>) -> &mut L {
203-
assert!(l.is_cc());
203+
if !l.is_cc() {
204+
let args: OsString = args.into_iter().map(|s| s.as_ref().to_owned()).collect();
205+
bug!("the linker is not a cc, args: {args:?}");
206+
}
204207
verbatim_args(l, args)
205208
}
206209
/// Arguments supported by both underlying linker and cc wrapper, pass verbatim.

0 commit comments

Comments
 (0)