From 2984bf674f5f1839c19002f4fd032eacc98596c9 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Tue, 24 May 2022 23:29:15 +0300 Subject: Simplify implementation of `-Z gcc-ld` - The logic is now unified for all targets (wasm targets should also be supported now) - Additional "symlink" files like `ld64` are eliminated - lld-wrapper is used for propagating the correct lld flavor - Cleanup "unwrap or exit" logic in lld-wrapper --- compiler/rustc_codegen_ssa/src/back/command.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'compiler/rustc_codegen_ssa/src/back/command.rs') diff --git a/compiler/rustc_codegen_ssa/src/back/command.rs b/compiler/rustc_codegen_ssa/src/back/command.rs index 17071ba1b5b..6c29692bd3b 100644 --- a/compiler/rustc_codegen_ssa/src/back/command.rs +++ b/compiler/rustc_codegen_ssa/src/back/command.rs @@ -105,12 +105,7 @@ impl Command { } Program::Lld(ref p, flavor) => { let mut c = process::Command::new(p); - c.arg("-flavor").arg(match flavor { - LldFlavor::Wasm => "wasm", - LldFlavor::Ld => "gnu", - LldFlavor::Link => "link", - LldFlavor::Ld64 => "darwin", - }); + c.arg("-flavor").arg(flavor.as_str()); if let LldFlavor::Wasm = flavor { // LLVM expects host-specific formatting for @file // arguments, but we always generate posix formatted files -- cgit 1.4.1-3-g733a5