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:
@@ -318,6 +318,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flag
|
|||||||
|
|
||||||
flags.GlobalFlags = append(flags.GlobalFlags, instructionSetFlags)
|
flags.GlobalFlags = append(flags.GlobalFlags, instructionSetFlags)
|
||||||
flags.ConlyFlags = append([]string{"${config.CommonGlobalConlyflags}"}, flags.ConlyFlags...)
|
flags.ConlyFlags = append([]string{"${config.CommonGlobalConlyflags}"}, flags.ConlyFlags...)
|
||||||
|
flags.CppFlags = append([]string{fmt.Sprintf("${config.%sGlobalCppflags}", hod)}, flags.CppFlags...)
|
||||||
|
|
||||||
if flags.Clang {
|
if flags.Clang {
|
||||||
flags.AsFlags = append(flags.AsFlags, tc.ClangAsflags())
|
flags.AsFlags = append(flags.AsFlags, tc.ClangAsflags())
|
||||||
|
@@ -45,9 +45,7 @@ var (
|
|||||||
"-Wl,--icf=safe",
|
"-Wl,--icf=safe",
|
||||||
}
|
}
|
||||||
|
|
||||||
arm64Cppflags = []string{
|
arm64Cppflags = []string{}
|
||||||
"-fvisibility-inlines-hidden",
|
|
||||||
}
|
|
||||||
|
|
||||||
arm64CpuVariantCflags = map[string][]string{
|
arm64CpuVariantCflags = map[string][]string{
|
||||||
"cortex-a53": []string{
|
"cortex-a53": []string{
|
||||||
|
@@ -42,9 +42,7 @@ var (
|
|||||||
"-fomit-frame-pointer",
|
"-fomit-frame-pointer",
|
||||||
}
|
}
|
||||||
|
|
||||||
armCppflags = []string{
|
armCppflags = []string{}
|
||||||
"-fvisibility-inlines-hidden",
|
|
||||||
}
|
|
||||||
|
|
||||||
armLdflags = []string{
|
armLdflags = []string{
|
||||||
"-Wl,--icf=safe",
|
"-Wl,--icf=safe",
|
||||||
|
@@ -71,6 +71,10 @@ var (
|
|||||||
"-Werror=format-security",
|
"-Werror=format-security",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deviceGlobalCppflags = []string{
|
||||||
|
"-fvisibility-inlines-hidden",
|
||||||
|
}
|
||||||
|
|
||||||
deviceGlobalLdflags = []string{
|
deviceGlobalLdflags = []string{
|
||||||
"-Wl,-z,noexecstack",
|
"-Wl,-z,noexecstack",
|
||||||
"-Wl,-z,relro",
|
"-Wl,-z,relro",
|
||||||
@@ -83,6 +87,8 @@ var (
|
|||||||
|
|
||||||
hostGlobalCflags = []string{}
|
hostGlobalCflags = []string{}
|
||||||
|
|
||||||
|
hostGlobalCppflags = []string{}
|
||||||
|
|
||||||
hostGlobalLdflags = []string{}
|
hostGlobalLdflags = []string{}
|
||||||
|
|
||||||
commonGlobalCppflags = []string{
|
commonGlobalCppflags = []string{
|
||||||
@@ -122,8 +128,10 @@ func init() {
|
|||||||
pctx.StaticVariable("CommonGlobalCflags", strings.Join(commonGlobalCflags, " "))
|
pctx.StaticVariable("CommonGlobalCflags", strings.Join(commonGlobalCflags, " "))
|
||||||
pctx.StaticVariable("CommonGlobalConlyflags", strings.Join(commonGlobalConlyflags, " "))
|
pctx.StaticVariable("CommonGlobalConlyflags", strings.Join(commonGlobalConlyflags, " "))
|
||||||
pctx.StaticVariable("DeviceGlobalCflags", strings.Join(deviceGlobalCflags, " "))
|
pctx.StaticVariable("DeviceGlobalCflags", strings.Join(deviceGlobalCflags, " "))
|
||||||
|
pctx.StaticVariable("DeviceGlobalCppflags", strings.Join(deviceGlobalCppflags, " "))
|
||||||
pctx.StaticVariable("DeviceGlobalLdflags", strings.Join(deviceGlobalLdflags, " "))
|
pctx.StaticVariable("DeviceGlobalLdflags", strings.Join(deviceGlobalLdflags, " "))
|
||||||
pctx.StaticVariable("HostGlobalCflags", strings.Join(hostGlobalCflags, " "))
|
pctx.StaticVariable("HostGlobalCflags", strings.Join(hostGlobalCflags, " "))
|
||||||
|
pctx.StaticVariable("HostGlobalCppflags", strings.Join(hostGlobalCppflags, " "))
|
||||||
pctx.StaticVariable("HostGlobalLdflags", strings.Join(hostGlobalLdflags, " "))
|
pctx.StaticVariable("HostGlobalLdflags", strings.Join(hostGlobalLdflags, " "))
|
||||||
pctx.StaticVariable("NoOverrideGlobalCflags", strings.Join(noOverrideGlobalCflags, " "))
|
pctx.StaticVariable("NoOverrideGlobalCflags", strings.Join(noOverrideGlobalCflags, " "))
|
||||||
|
|
||||||
|
@@ -40,9 +40,7 @@ var (
|
|||||||
"-fintegrated-as",
|
"-fintegrated-as",
|
||||||
}...)
|
}...)
|
||||||
|
|
||||||
mips64Cppflags = []string{
|
mips64Cppflags = []string{}
|
||||||
"-fvisibility-inlines-hidden",
|
|
||||||
}
|
|
||||||
|
|
||||||
mips64Ldflags = []string{
|
mips64Ldflags = []string{
|
||||||
"-Wl,--allow-shlib-undefined",
|
"-Wl,--allow-shlib-undefined",
|
||||||
|
@@ -38,9 +38,7 @@ var (
|
|||||||
"-fintegrated-as",
|
"-fintegrated-as",
|
||||||
}...)
|
}...)
|
||||||
|
|
||||||
mipsCppflags = []string{
|
mipsCppflags = []string{}
|
||||||
"-fvisibility-inlines-hidden",
|
|
||||||
}
|
|
||||||
|
|
||||||
mipsLdflags = []string{
|
mipsLdflags = []string{
|
||||||
"-Wl,--allow-shlib-undefined",
|
"-Wl,--allow-shlib-undefined",
|
||||||
|
@@ -171,6 +171,7 @@ func makeVarsToolchain(ctx android.MakeVarsContext, secondPrefix string,
|
|||||||
}, " "))
|
}, " "))
|
||||||
ctx.Strict(makePrefix+"GLOBAL_CPPFLAGS", strings.Join([]string{
|
ctx.Strict(makePrefix+"GLOBAL_CPPFLAGS", strings.Join([]string{
|
||||||
"${config.CommonGlobalCppflags}",
|
"${config.CommonGlobalCppflags}",
|
||||||
|
fmt.Sprintf("${config.%sGlobalCppflags}", hod),
|
||||||
toolchain.Cppflags(),
|
toolchain.Cppflags(),
|
||||||
}, " "))
|
}, " "))
|
||||||
ctx.Strict(makePrefix+"GLOBAL_LDFLAGS", strings.Join([]string{
|
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{
|
ctx.Strict(clangPrefix+"GLOBAL_CPPFLAGS", strings.Join([]string{
|
||||||
"${config.CommonClangGlobalCppflags}",
|
"${config.CommonClangGlobalCppflags}",
|
||||||
|
fmt.Sprintf("${config.%sGlobalCppflags}", hod),
|
||||||
toolchain.ClangCppflags(),
|
toolchain.ClangCppflags(),
|
||||||
}, " "))
|
}, " "))
|
||||||
ctx.Strict(clangPrefix+"GLOBAL_LDFLAGS", strings.Join([]string{
|
ctx.Strict(clangPrefix+"GLOBAL_LDFLAGS", strings.Join([]string{
|
||||||
|
Reference in New Issue
Block a user