aboutsummaryrefslogtreecommitdiff
path: root/cc/config/global.go
diff options
context:
space:
mode:
Diffstat (limited to 'cc/config/global.go')
-rw-r--r--cc/config/global.go26
1 files changed, 9 insertions, 17 deletions
diff --git a/cc/config/global.go b/cc/config/global.go
index e81ac0d47..b08ac6f7e 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -177,7 +177,7 @@ var (
"-Werror=format-security",
}
- commonGlobalLldflags = []string{
+ commonGlobalLdflags = []string{
"-fuse-ld=lld",
"-Wl,--icf=safe",
"-Wl,--no-demangle",
@@ -188,7 +188,7 @@ var (
}
// Linking flags for device code; not applied to host binaries.
- deviceGlobalLdflags = []string{
+ deviceGlobalLdflags = slices.Concat([]string{
"-Wl,-z,noexecstack",
"-Wl,-z,relro",
"-Wl,-z,now",
@@ -201,19 +201,14 @@ var (
"-Wl,--exclude-libs,libgcc_stripped.a",
"-Wl,--exclude-libs,libunwind_llvm.a",
"-Wl,--exclude-libs,libunwind.a",
- }
-
- deviceGlobalLldflags = append(append(deviceGlobalLdflags, commonGlobalLldflags...),
"-Wl,--compress-debug-sections=zstd",
- )
+ }, commonGlobalLdflags)
hostGlobalCflags = []string{}
hostGlobalCppflags = []string{}
- hostGlobalLdflags = []string{}
-
- hostGlobalLldflags = commonGlobalLldflags
+ hostGlobalLdflags = commonGlobalLdflags
commonGlobalCppflags = []string{
// -Wimplicit-fallthrough is not enabled by -Wall.
@@ -376,11 +371,13 @@ var (
"-pedantic",
"-pedantic-errors",
"-Werror=pedantic",
+ "-Wno-all",
+ "-Wno-everything",
}
CStdVersion = "gnu23"
CppStdVersion = "gnu++20"
- ExperimentalCStdVersion = "gnu2x"
+ ExperimentalCStdVersion = "gnu2y"
ExperimentalCppStdVersion = "gnu++2b"
// prebuilts/clang default settings.
@@ -409,10 +406,8 @@ func init() {
pctx.StaticVariable("CommonGlobalAsflags", strings.Join(commonGlobalAsflags, " "))
pctx.StaticVariable("DeviceGlobalCppflags", strings.Join(deviceGlobalCppflags, " "))
pctx.StaticVariable("DeviceGlobalLdflags", strings.Join(deviceGlobalLdflags, " "))
- pctx.StaticVariable("DeviceGlobalLldflags", strings.Join(deviceGlobalLldflags, " "))
pctx.StaticVariable("HostGlobalCppflags", strings.Join(hostGlobalCppflags, " "))
pctx.StaticVariable("HostGlobalLdflags", strings.Join(hostGlobalLdflags, " "))
- pctx.StaticVariable("HostGlobalLldflags", strings.Join(hostGlobalLldflags, " "))
pctx.VariableFunc("CommonGlobalCflags", func(ctx android.PackageVarContext) string {
flags := slices.Clone(commonGlobalCflags)
@@ -493,15 +488,12 @@ func init() {
}
pctx.PrefixedExistentPathsForSourcesVariable("CommonGlobalIncludes", "-I", commonGlobalIncludes)
- pctx.StaticVariable("CLANG_DEFAULT_VERSION", ClangDefaultVersion)
- pctx.StaticVariable("CLANG_DEFAULT_SHORT_VERSION", ClangDefaultShortVersion)
-
pctx.StaticVariableWithEnvOverride("ClangBase", "LLVM_PREBUILTS_BASE", ClangDefaultBase)
pctx.StaticVariableWithEnvOverride("ClangVersion", "LLVM_PREBUILTS_VERSION", ClangDefaultVersion)
+ pctx.StaticVariableWithEnvOverride("ClangShortVersion", "LLVM_RELEASE_VERSION", ClangDefaultShortVersion)
+
pctx.StaticVariable("ClangPath", "${ClangBase}/${HostPrebuiltTag}/${ClangVersion}")
pctx.StaticVariable("ClangBin", "${ClangPath}/bin")
-
- pctx.StaticVariableWithEnvOverride("ClangShortVersion", "LLVM_RELEASE_VERSION", ClangDefaultShortVersion)
pctx.StaticVariable("ClangAsanLibDir", "${ClangBase}/linux-x86/${ClangVersion}/lib/clang/${ClangShortVersion}/lib/linux")
pctx.StaticVariable("WarningAllowedProjects", strings.Join(WarningAllowedProjects, " "))