diff options
Diffstat (limited to 'cc/library.go')
| -rw-r--r-- | cc/library.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cc/library.go b/cc/library.go index 0bddab534..bca9a9680 100644 --- a/cc/library.go +++ b/cc/library.go @@ -281,11 +281,9 @@ func (f *flagExporter) reexportSystemDirs(dirs ...android.Path) { } func (f *flagExporter) reexportFlags(flags ...string) { - for _, flag := range flags { - if strings.HasPrefix(flag, "-I") || strings.HasPrefix(flag, "-isystem") { - panic(fmt.Errorf("Exporting invalid flag %q: "+ - "use reexportDirs or reexportSystemDirs to export directories", flag)) - } + if android.PrefixInList(flags, "-I") || android.PrefixInList(flags, "-isystem") { + panic(fmt.Errorf("Exporting invalid flag %q: "+ + "use reexportDirs or reexportSystemDirs to export directories", flag)) } f.flags = append(f.flags, flags...) } |