Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov committed Jul 1, 2024
1 parent 442e3cf commit 16eada4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/rustc_codegen_ssa/src/back/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ fn link_args<L: Linker + ?Sized>(
/// Arguments for the cc wrapper specifically.
/// Check that it's indeed a cc wrapper and pass verbatim.
fn cc_args<L: Linker + ?Sized>(l: &mut L, args: impl IntoIterator<Item: AsRef<OsStr>>) -> &mut L {
assert!(l.is_cc());
if !l.is_cc() {
let args: OsString = args.into_iter().map(|s| s.as_ref().to_owned()).collect();
bug!("the linker is not a cc, args: {args:?}");
}
verbatim_args(l, args)
}
/// Arguments supported by both underlying linker and cc wrapper, pass verbatim.
Expand Down

0 comments on commit 16eada4

Please sign in to comment.