Move -fvisibility-inlines-hidden to global device cppflags
It was previously set on arm[64] and mips[64], this will cause it to be set for x86[_64] too. Bug: 68855788 Test: m checkbuild Change-Id: I75af16e7d259963ad633cc664929144332bb435d
This commit is contained in:
parent
df93350ccd
commit
26f14509d1
7 changed files with 15 additions and 12 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())
|
||||
|
|
|
@ -45,9 +45,7 @@ var (
|
|||
"-Wl,--icf=safe",
|
||||
}
|
||||
|
||||
arm64Cppflags = []string{
|
||||
"-fvisibility-inlines-hidden",
|
||||
}
|
||||
arm64Cppflags = []string{}
|
||||
|
||||
arm64CpuVariantCflags = map[string][]string{
|
||||
"cortex-a53": []string{
|
||||
|
|
|
@ -42,9 +42,7 @@ var (
|
|||
"-fomit-frame-pointer",
|
||||
}
|
||||
|
||||
armCppflags = []string{
|
||||
"-fvisibility-inlines-hidden",
|
||||
}
|
||||
armCppflags = []string{}
|
||||
|
||||
armLdflags = []string{
|
||||
"-Wl,--icf=safe",
|
||||
|
|
|
@ -71,6 +71,10 @@ var (
|
|||
"-Werror=format-security",
|
||||
}
|
||||
|
||||
deviceGlobalCppflags = []string{
|
||||
"-fvisibility-inlines-hidden",
|
||||
}
|
||||
|
||||
deviceGlobalLdflags = []string{
|
||||
"-Wl,-z,noexecstack",
|
||||
"-Wl,-z,relro",
|
||||
|
@ -83,6 +87,8 @@ var (
|
|||
|
||||
hostGlobalCflags = []string{}
|
||||
|
||||
hostGlobalCppflags = []string{}
|
||||
|
||||
hostGlobalLdflags = []string{}
|
||||
|
||||
commonGlobalCppflags = []string{
|
||||
|
@ -122,8 +128,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, " "))
|
||||
|
||||
|
|
|
@ -40,9 +40,7 @@ var (
|
|||
"-fintegrated-as",
|
||||
}...)
|
||||
|
||||
mips64Cppflags = []string{
|
||||
"-fvisibility-inlines-hidden",
|
||||
}
|
||||
mips64Cppflags = []string{}
|
||||
|
||||
mips64Ldflags = []string{
|
||||
"-Wl,--allow-shlib-undefined",
|
||||
|
|
|
@ -38,9 +38,7 @@ var (
|
|||
"-fintegrated-as",
|
||||
}...)
|
||||
|
||||
mipsCppflags = []string{
|
||||
"-fvisibility-inlines-hidden",
|
||||
}
|
||||
mipsCppflags = []string{}
|
||||
|
||||
mipsLdflags = []string{
|
||||
"-Wl,--allow-shlib-undefined",
|
||||
|
|
|
@ -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