diff options
| author | Sébastien Marie <semarie@users.noreply.github.com> | 2015-02-23 20:03:15 +0100 |
|---|---|---|
| committer | Sébastien Marie <semarie@users.noreply.github.com> | 2015-02-23 20:03:15 +0100 |
| commit | cfd2a5cfa148b1c927571cc2e9f06e242831b696 (patch) | |
| tree | c41e1d58f30848636773eb0eac50ec0487610a37 | |
| parent | f0f7ca27de6b4e03f30012656dad270cda55a363 (diff) | |
| download | rust-cfd2a5cfa148b1c927571cc2e9f06e242831b696.tar.gz rust-cfd2a5cfa148b1c927571cc2e9f06e242831b696.zip | |
openbsd: restore linker option
The -Wl,--as-needed option was removed during first stages of bootstrapping between Linux and OpenBSD. Restore it, as it seems to be ok now.
| -rw-r--r-- | src/librustc_back/target/openbsd_base.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/librustc_back/target/openbsd_base.rs b/src/librustc_back/target/openbsd_base.rs index 42220a87bd4..759147b939c 100644 --- a/src/librustc_back/target/openbsd_base.rs +++ b/src/librustc_back/target/openbsd_base.rs @@ -20,6 +20,11 @@ pub fn opts() -> TargetOptions { linker_is_gnu: true, has_rpath: true, pre_link_args: 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(), ), position_independent_executables: true, .. Default::default() |
