about summary refs log tree commit diff
path: root/compiler/rustc_target/src/spec/linux_base.rs
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2021-03-28 00:02:23 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2021-03-28 01:49:15 +0300
commit6615ee89be2290c96aa7d4ab24dc94e23a8c7080 (patch)
tree2f417b415457bf9466af8ac25b1dce1defd2df49 /compiler/rustc_target/src/spec/linux_base.rs
parentafaf33dcafe9c7068b63eb997df221aa08db7c29 (diff)
downloadrust-6615ee89be2290c96aa7d4ab24dc94e23a8c7080.tar.gz
rust-6615ee89be2290c96aa7d4ab24dc94e23a8c7080.zip
linker: Use `--as-needed` by default when linker supports it
Diffstat (limited to 'compiler/rustc_target/src/spec/linux_base.rs')
-rw-r--r--compiler/rustc_target/src/spec/linux_base.rs8
1 files changed, 0 insertions, 8 deletions
diff --git a/compiler/rustc_target/src/spec/linux_base.rs b/compiler/rustc_target/src/spec/linux_base.rs
index 0631644ad63..aa2ff7bb399 100644
--- a/compiler/rustc_target/src/spec/linux_base.rs
+++ b/compiler/rustc_target/src/spec/linux_base.rs
@@ -5,14 +5,6 @@ pub fn opts() -> TargetOptions {
     args.insert(
         LinkerFlavor::Gcc,
         vec![
-            // We want to be able to strip as much executable code as possible
-            // from the linker command line, and this flag indicates to the
-            // linker that it can avoid linking in dynamic libraries that don't
-            // actually satisfy any symbols up to that point (as with many other
-            // resolutions the linker does). This option only applies to all
-            // following libraries so we're sure to pass it as one of the first
-            // arguments.
-            "-Wl,--as-needed".to_string(),
             // Always enable NX protection when it is available
             "-Wl,-z,noexecstack".to_string(),
         ],