mirror of
https://github.com/golang/go
synced 2024-09-15 22:20:06 +00:00
cmd/go: permit wrongly rejected -Wl,-O... linker flags
A typo caused the validation rule to check against -WL,-O... which is not a regular flag because the L should be lowercase as in the other rules. This caused valid linker flags to be rejected and people had to work around this by filtering their default flags that include, e.g., -Wl,-O1 for a simple link optimization. Fix the typo that wrongly rejected -Wl,-O... but allowed a non-existing -WL,-O flag.
This commit is contained in:
parent
f2eea4c1dc
commit
2ec7f2a2b9
|
@ -179,7 +179,7 @@ var validLinkerFlags = []*lazyregexp.Regexp{
|
|||
re(`-Wl,-berok`),
|
||||
re(`-Wl,-Bstatic`),
|
||||
re(`-Wl,-Bsymbolic-functions`),
|
||||
re(`-WL,-O([^@,\-][^,]*)?`),
|
||||
re(`-Wl,-O([^@,\-][^,]*)?`),
|
||||
re(`-Wl,-d[ny]`),
|
||||
re(`-Wl,--disable-new-dtags`),
|
||||
re(`-Wl,-e[=,][a-zA-Z0-9]*`),
|
||||
|
|
Loading…
Reference in a new issue