Add extra cflags for LLVM_NEXT
The staging compiler update sometimes needs additional cflags to build, but those flags may not be recognised by the current compiler. Add a new `llvmNextExtraCommonGlobalCflags` section and only append those flags when LLVM_NEXT is set. Test: LLVM_NEXT=true m Bug: 236798112 Change-Id: Icc4687950acd44798b2cf09131a425ddfd919214
This commit is contained in:
@@ -280,6 +280,11 @@ var (
|
||||
"-Wno-string-concatenation",
|
||||
}
|
||||
|
||||
llvmNextExtraCommonGlobalCflags = []string{
|
||||
"-Wno-unqualified-std-cast-call",
|
||||
"-Wno-deprecated-non-prototype",
|
||||
}
|
||||
|
||||
IllegalFlags = []string{
|
||||
"-w",
|
||||
}
|
||||
@@ -361,6 +366,11 @@ func init() {
|
||||
if ctx.Config().IsEnvTrue("USE_CCACHE") {
|
||||
flags = append(flags, "-Wno-unused-command-line-argument")
|
||||
}
|
||||
|
||||
if ctx.Config().IsEnvTrue("LLVM_NEXT") {
|
||||
flags = append(flags, llvmNextExtraCommonGlobalCflags...)
|
||||
}
|
||||
|
||||
return strings.Join(flags, " ")
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user