From 497c5a34da45527f6e8a2d5a325293da6724dafb Mon Sep 17 00:00:00 2001 From: Danek Duvall Date: Thu, 3 Aug 2017 17:18:19 -0700 Subject: [PATCH] Solaris linker options need to be accounted for in one test. 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/run-make/codegen-options-parsing/Makefile b/src/test/run-make/codegen-options-parsing/Makefile index 2b8b0712cc7d..dc46a8a04ef8 100644 --- a/src/test/run-make/codegen-options-parsing/Makefile +++ b/src/test/run-make/codegen-options-parsing/Makefile @@ -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[^ ]* [^ ]*\' -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[^ ]* [^ ]*\' -e '-dead_strip' -e '/OPT:REF')