]> git.lizzy.rs Git - rust.git/commitdiff
Solaris linker options need to be accounted for in one test.
authorDanek Duvall <danek.duvall@oracle.com>
Fri, 4 Aug 2017 00:18:19 +0000 (17:18 -0700)
committerDanek Duvall <danek.duvall@oracle.com>
Fri, 4 Aug 2017 00:18:19 +0000 (17:18 -0700)
This is a follow-up to f189d7a6937 and 9d11b089ad1.  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.

src/test/run-make/codegen-options-parsing/Makefile

index 2b8b0712cc7dede8779add231fa36545912af9ea..dc46a8a04ef8c4dd9ebb9ca243e7f16c5dee5e4a 100644 (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')