Merge "Enable arch variant properties in prebuilt_etc."
diff --git a/android/arch.go b/android/arch.go
index 0180b87..bb8cc02 100644
--- a/android/arch.go
+++ b/android/arch.go
@@ -391,6 +391,7 @@
LinuxBionic = NewOsType("linux_bionic", Host, false)
Windows = NewOsType("windows", HostCross, true)
Android = NewOsType("android", Device, false)
+ Fuchsia = NewOsType("fuchsia", Device, false)
osArchTypeMap = map[OsType][]ArchType{
Linux: []ArchType{X86, X86_64},
@@ -398,6 +399,7 @@
Darwin: []ArchType{X86_64},
Windows: []ArchType{X86, X86_64},
Android: []ArchType{Arm, Arm64, Mips, Mips64, X86, X86_64},
+ Fuchsia: []ArchType{Arm64, X86_64},
}
)
@@ -1191,7 +1193,12 @@
}
if variables.DeviceArch != nil && *variables.DeviceArch != "" {
- addTarget(Android, *variables.DeviceArch, variables.DeviceArchVariant,
+ var target = Android
+ if Bool(variables.Fuchsia) {
+ target = Fuchsia
+ }
+
+ addTarget(target, *variables.DeviceArch, variables.DeviceArchVariant,
variables.DeviceCpuVariant, variables.DeviceAbi)
if variables.DeviceSecondaryArch != nil && *variables.DeviceSecondaryArch != "" {
diff --git a/android/config.go b/android/config.go
index 7c1278e..09d9cbc 100644
--- a/android/config.go
+++ b/android/config.go
@@ -586,6 +586,10 @@
return Bool(c.productVariables.Unbundled_build) && !Bool(c.productVariables.Unbundled_build_sdks_from_source)
}
+func (c *config) Fuchsia() bool {
+ return Bool(c.productVariables.Fuchsia)
+}
+
func (c *config) IsPdkBuild() bool {
return Bool(c.productVariables.Pdk)
}
diff --git a/android/module.go b/android/module.go
index 303d8c6..aed16b3 100644
--- a/android/module.go
+++ b/android/module.go
@@ -64,6 +64,7 @@
Host() bool
Device() bool
Darwin() bool
+ Fuchsia() bool
Windows() bool
Debug() bool
PrimaryArch() bool
@@ -1121,6 +1122,10 @@
return a.target.Os == Darwin
}
+func (a *androidBaseContextImpl) Fuchsia() bool {
+ return a.target.Os == Fuchsia
+}
+
func (a *androidBaseContextImpl) Windows() bool {
return a.target.Os == Windows
}
diff --git a/android/variable.go b/android/variable.go
index ddaf166..e19d858 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -243,6 +243,8 @@
Product_is_iot *bool `json:",omitempty"`
+ Fuchsia *bool `json:",omitempty"`
+
DeviceKernelHeaders []string `json:",omitempty"`
ExtraVndkVersions []string `json:",omitempty"`
diff --git a/java/java.go b/java/java.go
index c89cb1a..2ac5a5b 100644
--- a/java/java.go
+++ b/java/java.go
@@ -998,12 +998,11 @@
if ctx.Device() && !ctx.Config().IsEnvFalse("TURBINE_ENABLED") {
if j.properties.Javac_shard_size != nil && *(j.properties.Javac_shard_size) > 0 {
enable_sharding = true
- if len(j.properties.Annotation_processors) != 0 ||
- len(j.properties.Annotation_processor_classes) != 0 {
- ctx.PropertyErrorf("javac_shard_size",
- "%q cannot be set when annotation processors are enabled.",
- j.properties.Javac_shard_size)
- }
+ // Formerly, there was a check here that prevented annotation processors
+ // from being used when sharding was enabled, as some annotation processors
+ // do not function correctly in sharded environments. It was removed to
+ // allow for the use of annotation processors that do function correctly
+ // with sharding enabled. See: b/77284273.
}
j.headerJarFile = j.compileJavaHeader(ctx, uniqueSrcFiles, srcJars, deps, flags, jarName, kotlinJars)
if ctx.Failed() {
diff --git a/ui/build/paths/config.go b/ui/build/paths/config.go
index e8e92e6..1d8684b 100644
--- a/ui/build/paths/config.go
+++ b/ui/build/paths/config.go
@@ -97,7 +97,6 @@
"lsof": Allowed,
"m4": Allowed,
"md5sum": Allowed,
- "mv": Allowed,
"openssl": Allowed,
"patch": Allowed,
"pgrep": Allowed,
@@ -157,6 +156,7 @@
"ls": Toybox,
"mkdir": Toybox,
"mktemp": Toybox,
+ "mv": Toybox,
"od": Toybox,
"paste": Toybox,
"pwd": Toybox,
diff --git a/ui/build/sandbox_linux.go b/ui/build/sandbox_linux.go
index f77eebb..85c4a9a 100644
--- a/ui/build/sandbox_linux.go
+++ b/ui/build/sandbox_linux.go
@@ -127,6 +127,9 @@
// in soong_ui
"-e",
+ // Mount /proc read-write, necessary to run a nested nsjail or minijail0
+ "--proc_rw",
+
// Use a consistent user & group.
// Note that these are mapped back to the real UID/GID when
// doing filesystem operations, so they're rather arbitrary.