Merge "Revert "Revert "Add external projects only CFlags option""" am: 8d29e1e024
am: 2090540f19
Change-Id: I8d1872552155864a7fa175c9fc1b25031ed8bc76
diff --git a/android/api_levels.go b/android/api_levels.go
index a519117..b1b954c 100644
--- a/android/api_levels.go
+++ b/android/api_levels.go
@@ -65,6 +65,8 @@
"N": 24,
"N-MR1": 25,
"O": 26,
+ "O-MR1": 27,
+ "P": 28,
}
for i, codename := range ctx.Config().PlatformVersionCombinedCodenames() {
apiLevelsMap[codename] = baseApiLevel + i
diff --git a/android/variable.go b/android/variable.go
index af414cb..7bf5a06 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -96,6 +96,19 @@
Uml struct {
Cppflags []string
}
+
+ Use_lmkd_stats_log struct {
+ Cflags []string
+ }
+
+ Arc struct {
+ Cflags []string
+ Exclude_srcs []string
+ Include_dirs []string
+ Shared_libs []string
+ Static_libs []string
+ Srcs []string
+ }
} `android:"arch_variant"`
}
@@ -166,6 +179,8 @@
Enforce_vintf_manifest *bool `json:",omitempty"`
Pdk *bool `json:",omitempty"`
Uml *bool `json:",omitempty"`
+ Use_lmkd_stats_log *bool `json:",omitempty"`
+ Arc *bool `json:",omitempty"`
MinimizeJavaDebugInfo *bool `json:",omitempty"`
IntegerOverflowExcludePaths *[]string `json:",omitempty"`
diff --git a/cc/config/arm64_device.go b/cc/config/arm64_device.go
index 73cee5c..01e7c36 100644
--- a/cc/config/arm64_device.go
+++ b/cc/config/arm64_device.go
@@ -177,7 +177,6 @@
toolchain64Bit
ldflags string
- lldflags string
toolchainCflags string
toolchainClangCflags string
}
@@ -235,7 +234,7 @@
}
func (t *toolchainArm64) ClangLldflags() string {
- return t.lldflags
+ return "${config.Arm64Lldflags}"
}
func (t *toolchainArm64) ToolchainClangCflags() string {
@@ -273,10 +272,6 @@
"${config.Arm64Ldflags}",
extraLdflags,
}, " "),
- lldflags: strings.Join([]string{
- "${config.Arm64Lldflags}",
- extraLdflags,
- }, " "),
toolchainCflags: variantOrDefault(arm64CpuVariantCflagsVar, arch.CpuVariant),
toolchainClangCflags: strings.Join(toolchainClangCflags, " "),
}
diff --git a/cc/config/global.go b/cc/config/global.go
index c734c2e..a63c6ba 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -189,7 +189,7 @@
// This is used by non-NDK modules to get jni.h. export_include_dirs doesn't help
// with this, since there is no associated library.
pctx.PrefixedExistentPathsForSourcesVariable("CommonNativehelperInclude", "-I",
- []string{"libnativehelper/include_deprecated"})
+ []string{"libnativehelper/include_jni"})
pctx.SourcePathVariable("ClangDefaultBase", ClangDefaultBase)
pctx.VariableFunc("ClangBase", func(ctx android.PackageVarContext) string {
diff --git a/cc/sanitize.go b/cc/sanitize.go
index e59edf5..148d8ec 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -227,8 +227,8 @@
}
}
- // Enable CFI for all components in the include paths
- if s.Cfi == nil && ctx.Config().CFIEnabledForPath(ctx.ModuleDir()) {
+ // Enable CFI for all components in the include paths (for Aarch64 only)
+ if s.Cfi == nil && ctx.Config().CFIEnabledForPath(ctx.ModuleDir()) && ctx.Arch().ArchType == android.Arm64 {
s.Cfi = boolPtr(true)
if inList("cfi", ctx.Config().SanitizeDeviceDiag()) {
s.Diag.Cfi = boolPtr(true)
@@ -263,6 +263,12 @@
s.Integer_overflow = nil
}
+ // Also disable CFI for VNDK variants of components
+ if ctx.isVndk() && ctx.useVndk() {
+ s.Cfi = nil
+ s.Diag.Cfi = nil
+ }
+
if ctx.staticBinary() {
s.Address = nil
s.Coverage = nil
diff --git a/java/config/config.go b/java/config/config.go
index fe57c50..ec1effa 100644
--- a/java/config/config.go
+++ b/java/config/config.go
@@ -41,6 +41,8 @@
"services",
"android.car",
"android.car7",
+ "core-oj",
+ "core-libart",
}
)