Skip to content

Commit 15e5cf3

Browse files
committed
use a compatible syntax for grep GNU/BSD
The BSD grep for "basic regex" don't support \| as alternate operator. Use multiple -e arguments for expressing alternative.
1 parent 97842f5 commit 15e5cf3

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

Lines changed: 2 additions & 2 deletions
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\|-dead_strip\|/OPT:REF,ICF'
28+
grep -e '--gc-sections' -e '-dead_strip' -e '/OPT:REF,ICF'
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\|-dead_strip\|/OPT:REF,ICF')
31+
(! grep -e '--gc-sections' -e '-dead_strip' -e '/OPT:REF,ICF')

0 commit comments

Comments
 (0)