Rollup merge of #22726 - semarie:openbsd-Wl-as-needed, r=alexcrichton

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.
This commit is contained in:
Manish Goregaokar 2015-02-24 07:13:48 +05:30
commit 39c0aa33ad

View file

@ -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()