diff --git a/cc/compiler.go b/cc/compiler.go index 10cec8cea..8f119cf3c 100644 --- a/cc/compiler.go +++ b/cc/compiler.go @@ -392,12 +392,6 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps fmt.Sprintf("${config.%sGlobalCflags}", hod)) } - if flags.Clang { - if strings.HasPrefix(android.PathForModuleSrc(ctx).String(), "external/") { - flags.GlobalFlags = append([]string{"${config.ClangExternalCflags}"}, flags.GlobalFlags...) - } - } - if ctx.Device() { if Bool(compiler.Properties.Rtti) { flags.CppFlags = append(flags.CppFlags, "-frtti") diff --git a/cc/config/clang.go b/cc/config/clang.go index 69668b670..ba1cd3c01 100644 --- a/cc/config/clang.go +++ b/cc/config/clang.go @@ -173,17 +173,14 @@ func init() { // this new warning are fixed. "-Wno-null-pointer-arithmetic", - // Disable c++98-specific warning since Android is not concerned with C++98 - // compatibility. - "-Wno-c++98-compat-extra-semi", - }, " ")) - - // Extra cflags for projects under external/ directory - pctx.StaticVariable("ClangExtraExternalCflags", strings.Join([]string{ // http://b/72330874 Disable -Wenum-compare until the instances detected by this new // warning are fixed. "-Wno-enum-compare", "-Wno-enum-compare-switch", + + // Disable c++98-specific warning since Android is not concerned with C++98 + // compatibility. + "-Wno-c++98-compat-extra-semi", }, " ")) } diff --git a/cc/config/global.go b/cc/config/global.go index a63c6bae3..cf8c2a693 100644 --- a/cc/config/global.go +++ b/cc/config/global.go @@ -170,8 +170,6 @@ func init() { pctx.StaticVariable("CommonClangGlobalCppflags", strings.Join(append(ClangFilterUnknownCflags(commonGlobalCppflags), "${ClangExtraCppflags}"), " ")) - pctx.StaticVariable("ClangExternalCflags", "${ClangExtraExternalCflags}") - // Everything in these lists is a crime against abstraction and dependency tracking. // Do not add anything to this list. pctx.PrefixedExistentPathsForSourcesVariable("CommonGlobalIncludes", "-I",