Skip to content

Commit 497c5a3

Browse files
author
Danek Duvall
committed
Solaris linker options need to be accounted for in one test.
This is a follow-up to f189d7a and 9d11b08. 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.
1 parent 45b90ef commit 497c5a3

File tree

1 file changed

+2
-2
lines changed
  • src/test/run-make/codegen-options-parsing

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ all:
2525

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

0 commit comments

Comments
 (0)