We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 917db28 + 6115f2e commit 463e427Copy full SHA for 463e427
src/librustc_back/target/freebsd_base.rs
@@ -16,13 +16,20 @@ pub fn opts() -> TargetOptions {
16
linker: "cc".to_string(),
17
dynamic_linking: true,
18
executables: true,
19
+ linker_is_gnu: true,
20
has_rpath: true,
- pre_link_args: vec![
21
+ pre_link_args: vec!(
22
+ // GNU-style linkers will use this to omit linking to libraries
23
+ // which don't actually fulfill any relocations, but only for
24
+ // libraries which follow this flag. Thus, use it before
25
+ // specifying libraries to link to.
26
+ "-Wl,--as-needed".to_string(),
27
+
28
// Always enable NX protection when it is available
29
"-Wl,-z,noexecstack".to_string(),
- ],
30
+ ),
31
+ position_independent_executables: true,
32
exe_allocation_crate: super::maybe_jemalloc(),
-
33
.. Default::default()
34
}
35
0 commit comments