]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_target/src/spec/freebsd_base.rs
Auto merge of #84842 - blkerby:null_lowercase, r=joshtriplett
[rust.git] / compiler / rustc_target / src / spec / freebsd_base.rs
index c70c492716b30e1a09324570a2e4a9cd9dffeb6c..5d3c28e5f29c9d80a19675ff9f85d5ff4ce830be 100644 (file)
@@ -1,28 +1,13 @@
-use crate::spec::{LinkArgs, LinkerFlavor, RelroLevel, TargetOptions};
+use crate::spec::{RelroLevel, TargetOptions};
 
 pub fn opts() -> TargetOptions {
-    let mut args = LinkArgs::new();
-    args.insert(
-        LinkerFlavor::Gcc,
-        vec![
-            // GNU-style linkers will use this to omit linking to libraries
-            // which don't actually fulfill any relocations, but only for
-            // libraries which follow this flag.  Thus, use it before
-            // specifying libraries to link to.
-            "-Wl,--as-needed".to_string(),
-            // Always enable NX protection when it is available
-            "-Wl,-z,noexecstack".to_string(),
-        ],
-    );
-
     TargetOptions {
         os: "freebsd".to_string(),
         dynamic_linking: true,
         executables: true,
-        os_family: Some("unix".to_string()),
+        families: vec!["unix".to_string()],
         linker_is_gnu: true,
         has_rpath: true,
-        pre_link_args: args,
         position_independent_executables: true,
         eliminate_frame_pointer: false, // FIXME 43575
         relro_level: RelroLevel::Full,