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.
This commit is contained in:
Sébastien Marie 2016-02-13 20:03:08 +01:00
parent 97842f54c9
commit 15e5cf383d

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\|-dead_strip\|/OPT:REF,ICF'
grep -e '--gc-sections' -e '-dead_strip' -e '/OPT:REF,ICF'
# ... unless you specifically ask to keep it
$(RUSTC) -Z print-link-args -C link-dead-code dummy.rs 2>&1 | \
(! grep -e '--gc-sections\|-dead_strip\|/OPT:REF,ICF')
(! grep -e '--gc-sections' -e '-dead_strip' -e '/OPT:REF,ICF')