Merge changes Iae2bda98,I68e64888,I75af16e7
am: d03553cf13
Change-Id: I775a10c73ab21f6afb102e7a0a1d8ef42d061137
This commit is contained in:
commit
f053a45ad9
9 changed files with 18 additions and 60 deletions
|
@ -318,6 +318,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flag
|
|||
|
||||
flags.GlobalFlags = append(flags.GlobalFlags, instructionSetFlags)
|
||||
flags.ConlyFlags = append([]string{"${config.CommonGlobalConlyflags}"}, flags.ConlyFlags...)
|
||||
flags.CppFlags = append([]string{fmt.Sprintf("${config.%sGlobalCppflags}", hod)}, flags.CppFlags...)
|
||||
|
||||
if flags.Clang {
|
||||
flags.AsFlags = append(flags.AsFlags, tc.ClangAsflags())
|
||||
|
|
|
@ -23,18 +23,8 @@ import (
|
|||
|
||||
var (
|
||||
arm64Cflags = []string{
|
||||
"-fdata-sections",
|
||||
"-fno-short-enums",
|
||||
|
||||
// Help catch common 32/64-bit errors.
|
||||
"-Werror=implicit-function-declaration",
|
||||
|
||||
"-fno-strict-volatile-bitfields",
|
||||
|
||||
// TARGET_RELEASE_CFLAGS
|
||||
"-fgcse-after-reload",
|
||||
"-frerun-cse-after-loop",
|
||||
"-frename-registers",
|
||||
}
|
||||
|
||||
arm64Ldflags = []string{
|
||||
|
@ -45,9 +35,7 @@ var (
|
|||
"-Wl,--icf=safe",
|
||||
}
|
||||
|
||||
arm64Cppflags = []string{
|
||||
"-fvisibility-inlines-hidden",
|
||||
}
|
||||
arm64Cppflags = []string{}
|
||||
|
||||
arm64CpuVariantCflags = map[string][]string{
|
||||
"cortex-a53": []string{
|
||||
|
|
|
@ -28,23 +28,10 @@ var (
|
|||
}
|
||||
|
||||
armCflags = []string{
|
||||
"-fdata-sections",
|
||||
"-fno-short-enums",
|
||||
|
||||
"-fno-builtin-sin",
|
||||
"-fno-strict-volatile-bitfields",
|
||||
|
||||
// TARGET_RELEASE_CFLAGS
|
||||
"-fgcse-after-reload",
|
||||
"-frerun-cse-after-loop",
|
||||
"-frename-registers",
|
||||
|
||||
"-fomit-frame-pointer",
|
||||
}
|
||||
|
||||
armCppflags = []string{
|
||||
"-fvisibility-inlines-hidden",
|
||||
}
|
||||
armCppflags = []string{}
|
||||
|
||||
armLdflags = []string{
|
||||
"-Wl,--icf=safe",
|
||||
|
@ -54,7 +41,6 @@ var (
|
|||
|
||||
armArmCflags = []string{
|
||||
"-fstrict-aliasing",
|
||||
"-funswitch-loops",
|
||||
}
|
||||
|
||||
armThumbCflags = []string{
|
||||
|
|
|
@ -56,6 +56,8 @@ var (
|
|||
"-fdiagnostics-color",
|
||||
|
||||
"-ffunction-sections",
|
||||
"-fdata-sections",
|
||||
"-fno-short-enums",
|
||||
"-funwind-tables",
|
||||
"-fstack-protector-strong",
|
||||
"-Wa,--noexecstack",
|
||||
|
@ -71,6 +73,10 @@ var (
|
|||
"-Werror=format-security",
|
||||
}
|
||||
|
||||
deviceGlobalCppflags = []string{
|
||||
"-fvisibility-inlines-hidden",
|
||||
}
|
||||
|
||||
deviceGlobalLdflags = []string{
|
||||
"-Wl,-z,noexecstack",
|
||||
"-Wl,-z,relro",
|
||||
|
@ -83,6 +89,8 @@ var (
|
|||
|
||||
hostGlobalCflags = []string{}
|
||||
|
||||
hostGlobalCppflags = []string{}
|
||||
|
||||
hostGlobalLdflags = []string{}
|
||||
|
||||
commonGlobalCppflags = []string{
|
||||
|
@ -122,8 +130,10 @@ func init() {
|
|||
pctx.StaticVariable("CommonGlobalCflags", strings.Join(commonGlobalCflags, " "))
|
||||
pctx.StaticVariable("CommonGlobalConlyflags", strings.Join(commonGlobalConlyflags, " "))
|
||||
pctx.StaticVariable("DeviceGlobalCflags", strings.Join(deviceGlobalCflags, " "))
|
||||
pctx.StaticVariable("DeviceGlobalCppflags", strings.Join(deviceGlobalCppflags, " "))
|
||||
pctx.StaticVariable("DeviceGlobalLdflags", strings.Join(deviceGlobalLdflags, " "))
|
||||
pctx.StaticVariable("HostGlobalCflags", strings.Join(hostGlobalCflags, " "))
|
||||
pctx.StaticVariable("HostGlobalCppflags", strings.Join(hostGlobalCppflags, " "))
|
||||
pctx.StaticVariable("HostGlobalLdflags", strings.Join(hostGlobalLdflags, " "))
|
||||
pctx.StaticVariable("NoOverrideGlobalCflags", strings.Join(noOverrideGlobalCflags, " "))
|
||||
|
||||
|
|
|
@ -22,27 +22,17 @@ import (
|
|||
|
||||
var (
|
||||
mips64Cflags = []string{
|
||||
"-fomit-frame-pointer",
|
||||
"-funswitch-loops",
|
||||
"-Umips",
|
||||
"-fdata-sections",
|
||||
|
||||
// Help catch common 32/64-bit errors.
|
||||
"-Werror=implicit-function-declaration",
|
||||
|
||||
// TARGET_RELEASE_CFLAGS
|
||||
"-fgcse-after-reload",
|
||||
"-frerun-cse-after-loop",
|
||||
"-frename-registers",
|
||||
}
|
||||
|
||||
mips64ClangCflags = append(mips64Cflags, []string{
|
||||
"-fintegrated-as",
|
||||
}...)
|
||||
|
||||
mips64Cppflags = []string{
|
||||
"-fvisibility-inlines-hidden",
|
||||
}
|
||||
mips64Cppflags = []string{}
|
||||
|
||||
mips64Ldflags = []string{
|
||||
"-Wl,--allow-shlib-undefined",
|
||||
|
|
|
@ -23,14 +23,7 @@ import (
|
|||
var (
|
||||
mipsCflags = []string{
|
||||
"-fomit-frame-pointer",
|
||||
"-funswitch-loops",
|
||||
"-Umips",
|
||||
"-fdata-sections",
|
||||
|
||||
// TARGET_RELEASE_CFLAGS
|
||||
"-fgcse-after-reload",
|
||||
"-frerun-cse-after-loop",
|
||||
"-frename-registers",
|
||||
}
|
||||
|
||||
mipsClangCflags = append(mipsCflags, []string{
|
||||
|
@ -38,9 +31,7 @@ var (
|
|||
"-fintegrated-as",
|
||||
}...)
|
||||
|
||||
mipsCppflags = []string{
|
||||
"-fvisibility-inlines-hidden",
|
||||
}
|
||||
mipsCppflags = []string{}
|
||||
|
||||
mipsLdflags = []string{
|
||||
"-Wl,--allow-shlib-undefined",
|
||||
|
|
|
@ -22,11 +22,6 @@ import (
|
|||
|
||||
var (
|
||||
x86_64Cflags = []string{
|
||||
"-finline-functions",
|
||||
"-finline-limit=300",
|
||||
"-fno-short-enums",
|
||||
"-funswitch-loops",
|
||||
|
||||
// Help catch common 32/64-bit errors.
|
||||
"-Werror=implicit-function-declaration",
|
||||
}
|
||||
|
|
|
@ -21,12 +21,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
x86Cflags = []string{
|
||||
"-finline-functions",
|
||||
"-finline-limit=300",
|
||||
"-fno-short-enums",
|
||||
"-funswitch-loops",
|
||||
}
|
||||
x86Cflags = []string{}
|
||||
|
||||
x86ClangCflags = append(x86Cflags, []string{
|
||||
"-msse3",
|
||||
|
|
|
@ -171,6 +171,7 @@ func makeVarsToolchain(ctx android.MakeVarsContext, secondPrefix string,
|
|||
}, " "))
|
||||
ctx.Strict(makePrefix+"GLOBAL_CPPFLAGS", strings.Join([]string{
|
||||
"${config.CommonGlobalCppflags}",
|
||||
fmt.Sprintf("${config.%sGlobalCppflags}", hod),
|
||||
toolchain.Cppflags(),
|
||||
}, " "))
|
||||
ctx.Strict(makePrefix+"GLOBAL_LDFLAGS", strings.Join([]string{
|
||||
|
@ -217,6 +218,7 @@ func makeVarsToolchain(ctx android.MakeVarsContext, secondPrefix string,
|
|||
}, " "))
|
||||
ctx.Strict(clangPrefix+"GLOBAL_CPPFLAGS", strings.Join([]string{
|
||||
"${config.CommonClangGlobalCppflags}",
|
||||
fmt.Sprintf("${config.%sGlobalCppflags}", hod),
|
||||
toolchain.ClangCppflags(),
|
||||
}, " "))
|
||||
ctx.Strict(clangPrefix+"GLOBAL_LDFLAGS", strings.Join([]string{
|
||||
|
|
Loading…
Reference in a new issue