superenv: prune -Wl,-z,defs when refurbishing

`-Wl,-z,defs` should be pruned out entirely since `-z defs` is not
understood by macOS's `ld`, and the analogue `-undefined error` is
already the default.
This commit is contained in:
ilovezfs 2016-11-02 01:21:15 -07:00
parent f14a3a17de
commit 2c43649ffc

View File

@ -169,6 +169,8 @@ class Cmd
when "-Wno-deprecated-register" when "-Wno-deprecated-register"
# older gccs don't support these flags # older gccs don't support these flags
args << arg unless tool =~ /^g..-4.[02]/ args << arg unless tool =~ /^g..-4.[02]/
when /^-Wl,-z,defs/
# -Wl,-undefined,error is already the default
when /^-W[alp],/, /^-Wno-/ when /^-W[alp],/, /^-Wno-/
args << arg args << arg
when /^-W.*/ when /^-W.*/