Solaris linker options need to be accounted for in one test.

This is a follow-up to f189d7a693 and 9d11b089ad.  While `-z ignore`
is what needs to be passed to the Solaris linker, because gcc is used as
the default linker, both that form and `-Wl,-z -Wl,ignore` (including
extra double quotes) need to be taken into account, which explains the
more complex regular expression.
This commit is contained in:
Danek Duvall 2017-08-03 17:18:19 -07:00
parent 45b90ef52e
commit 497c5a34da

View File

@ -25,7 +25,7 @@ all:
# Should not link dead code...
$(RUSTC) -Z print-link-args dummy.rs 2>&1 | \
grep -e '--gc-sections' -e '-dead_strip' -e '/OPT:REF'
grep -e '--gc-sections' -e '-z[^ ]* [^ ]*\<ignore\>' -e '-dead_strip' -e '/OPT:REF'
# ... unless you specifically ask to keep it
$(RUSTC) -Z print-link-args -C link-dead-code dummy.rs 2>&1 | \
(! grep -e '--gc-sections' -e '-dead_strip' -e '/OPT:REF')
(! grep -e '--gc-sections' -e '-z[^ ]* [^ ]*\<ignore\>' -e '-dead_strip' -e '/OPT:REF')