mirror of
https://github.com/golang/go
synced 2024-11-18 01:14:48 -07:00
parent
e4c3925925
commit
43ea8da0b2
@ -43,6 +43,7 @@ var re = lazyregexp.New
|
||||
|
||||
var validCompilerFlags = []*lazyregexp.Regexp{
|
||||
re(`-D([A-Za-z_].*)`),
|
||||
re(`-U([A-Za-z_]*)`),
|
||||
re(`-F([^@\-].*)`),
|
||||
re(`-I([^@\-].*)`),
|
||||
re(`-O`),
|
||||
@ -51,6 +52,7 @@ var validCompilerFlags = []*lazyregexp.Regexp{
|
||||
re(`-W([^@,]+)`), // -Wall but not -Wa,-foo.
|
||||
re(`-Wa,-mbig-obj`),
|
||||
re(`-Wp,-D([A-Za-z_].*)`),
|
||||
re(`-Wp, -U([A-Za-z_]*)`),
|
||||
re(`-ansi`),
|
||||
re(`-f(no-)?asynchronous-unwind-tables`),
|
||||
re(`-f(no-)?blocks`),
|
||||
@ -127,6 +129,7 @@ var validCompilerFlags = []*lazyregexp.Regexp{
|
||||
var validCompilerFlagsWithNextArg = []string{
|
||||
"-arch",
|
||||
"-D",
|
||||
"-U",
|
||||
"-I",
|
||||
"-framework",
|
||||
"-isysroot",
|
||||
|
@ -12,6 +12,7 @@ import (
|
||||
var goodCompilerFlags = [][]string{
|
||||
{"-DFOO"},
|
||||
{"-Dfoo=bar"},
|
||||
{"-Ufoo"},
|
||||
{"-F/Qt"},
|
||||
{"-I/"},
|
||||
{"-I/etc/passwd"},
|
||||
@ -67,6 +68,7 @@ var goodCompilerFlags = [][]string{
|
||||
var badCompilerFlags = [][]string{
|
||||
{"-D@X"},
|
||||
{"-D-X"},
|
||||
{"-Ufoo=bar"},
|
||||
{"-F@dir"},
|
||||
{"-F-dir"},
|
||||
{"-I@dir"},
|
||||
|
Loading…
Reference in New Issue
Block a user