Move toolchain and global variables into separate package
Move all of the configuration into a cc/config package Change-Id: If56fc7242062ed1ce3cb297f78a1e0ef7537373c
This commit is contained in:
@@ -20,6 +20,8 @@ package cc
|
||||
import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"android/soong/cc/config"
|
||||
)
|
||||
|
||||
// Check for invalid c/conly/cpp/asflags and suggest alternatives. Only use this
|
||||
@@ -32,7 +34,7 @@ func CheckBadCompilerFlags(ctx BaseModuleContext, prop string, flags []string) {
|
||||
ctx.PropertyErrorf(prop, "Flag `%s` must start with `-`", flag)
|
||||
} else if strings.HasPrefix(flag, "-I") || strings.HasPrefix(flag, "-isystem") {
|
||||
ctx.PropertyErrorf(prop, "Bad flag `%s`, use local_include_dirs or include_dirs instead", flag)
|
||||
} else if inList(flag, illegalFlags) {
|
||||
} else if inList(flag, config.IllegalFlags) {
|
||||
ctx.PropertyErrorf(prop, "Illegal flag `%s`", flag)
|
||||
} else if strings.Contains(flag, " ") {
|
||||
args := strings.Split(flag, " ")
|
||||
|
Reference in New Issue
Block a user