Revert "Add external projects only CFlags option"
This reverts commit 6a350878d8
.
Reason for revert: Breakage of many AOSP targets
Change-Id: I917e6daa04ac02ecb98c7bb1816f9bdaf46429f5
This commit is contained in:
parent
328ec9e7ee
commit
0a5fee786f
|
@ -392,12 +392,6 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
|
||||||
fmt.Sprintf("${config.%sGlobalCflags}", hod))
|
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 ctx.Device() {
|
||||||
if Bool(compiler.Properties.Rtti) {
|
if Bool(compiler.Properties.Rtti) {
|
||||||
flags.CppFlags = append(flags.CppFlags, "-frtti")
|
flags.CppFlags = append(flags.CppFlags, "-frtti")
|
||||||
|
|
|
@ -173,17 +173,14 @@ func init() {
|
||||||
// this new warning are fixed.
|
// this new warning are fixed.
|
||||||
"-Wno-null-pointer-arithmetic",
|
"-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
|
// http://b/72330874 Disable -Wenum-compare until the instances detected by this new
|
||||||
// warning are fixed.
|
// warning are fixed.
|
||||||
"-Wno-enum-compare",
|
"-Wno-enum-compare",
|
||||||
"-Wno-enum-compare-switch",
|
"-Wno-enum-compare-switch",
|
||||||
|
|
||||||
|
// Disable c++98-specific warning since Android is not concerned with C++98
|
||||||
|
// compatibility.
|
||||||
|
"-Wno-c++98-compat-extra-semi",
|
||||||
}, " "))
|
}, " "))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -170,8 +170,6 @@ func init() {
|
||||||
pctx.StaticVariable("CommonClangGlobalCppflags",
|
pctx.StaticVariable("CommonClangGlobalCppflags",
|
||||||
strings.Join(append(ClangFilterUnknownCflags(commonGlobalCppflags), "${ClangExtraCppflags}"), " "))
|
strings.Join(append(ClangFilterUnknownCflags(commonGlobalCppflags), "${ClangExtraCppflags}"), " "))
|
||||||
|
|
||||||
pctx.StaticVariable("ClangExternalCflags", "${ClangExtraExternalCflags}")
|
|
||||||
|
|
||||||
// Everything in these lists is a crime against abstraction and dependency tracking.
|
// Everything in these lists is a crime against abstraction and dependency tracking.
|
||||||
// Do not add anything to this list.
|
// Do not add anything to this list.
|
||||||
pctx.PrefixedExistentPathsForSourcesVariable("CommonGlobalIncludes", "-I",
|
pctx.PrefixedExistentPathsForSourcesVariable("CommonGlobalIncludes", "-I",
|
||||||
|
|
Loading…
Reference in New Issue