Merge "Remove bazel dev mode"
diff --git a/android/allowlists/allowlists.go b/android/allowlists/allowlists.go
index 1f51c7e..78f1de2 100644
--- a/android/allowlists/allowlists.go
+++ b/android/allowlists/allowlists.go
@@ -334,6 +334,7 @@
"system/apex": Bp2BuildDefaultFalse, // TODO(b/207466993): flaky failures
"system/apex/apexer": Bp2BuildDefaultTrue,
"system/apex/libs": Bp2BuildDefaultTrueRecursively,
+ "system/apex/libs/libapexsupport": Bp2BuildDefaultFalseRecursively, // TODO(b/267572288): depends on rust
"system/apex/proto": Bp2BuildDefaultTrueRecursively,
"system/apex/tools": Bp2BuildDefaultTrueRecursively,
"system/core/debuggerd": Bp2BuildDefaultTrueRecursively,
diff --git a/android/bazel_handler.go b/android/bazel_handler.go
index 2e818b1..f4b368b 100644
--- a/android/bazel_handler.go
+++ b/android/bazel_handler.go
@@ -28,7 +28,7 @@
"android/soong/android/allowlists"
"android/soong/bazel/cquery"
"android/soong/shared"
- "android/soong/starlark_fmt"
+ "android/soong/starlark_import"
"github.com/google/blueprint"
"github.com/google/blueprint/metrics"
@@ -44,34 +44,6 @@
Description: "",
CommandDeps: []string{"${bazelBuildRunfilesTool}"},
}, "outDir")
- allowedBazelEnvironmentVars = []string{
- // clang-tidy
- "ALLOW_LOCAL_TIDY_TRUE",
- "DEFAULT_TIDY_HEADER_DIRS",
- "TIDY_TIMEOUT",
- "WITH_TIDY",
- "WITH_TIDY_FLAGS",
- "TIDY_EXTERNAL_VENDOR",
-
- "SKIP_ABI_CHECKS",
- "UNSAFE_DISABLE_APEX_ALLOWED_DEPS_CHECK",
- "AUTO_ZERO_INITIALIZE",
- "AUTO_PATTERN_INITIALIZE",
- "AUTO_UNINITIALIZE",
- "USE_CCACHE",
- "LLVM_NEXT",
- "LLVM_PREBUILTS_VERSION",
- "LLVM_RELEASE_VERSION",
- "ALLOW_UNKNOWN_WARNING_OPTION",
-
- "UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT",
-
- // Overrides the version in the apex_manifest.json. The version is unique for
- // each branch (internal, aosp, mainline releases, dessert releases). This
- // enables modules built on an older branch to be installed against a newer
- // device for development purposes.
- "OVERRIDE_APEX_MANIFEST_DEFAULT_VERSION",
- }
)
func registerMixedBuildsMutator(ctx RegisterMutatorsContext) {
@@ -717,7 +689,11 @@
// explicitly in BUILD files.
"BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1",
}
- for _, envvar := range allowedBazelEnvironmentVars {
+ capturedEnvVars, err := starlark_import.GetStarlarkValue[[]string]("captured_env_vars")
+ if err != nil {
+ panic(err)
+ }
+ for _, envvar := range capturedEnvVars {
val := config.Getenv(envvar)
if val == "" {
continue
@@ -1436,13 +1412,3 @@
func bazelDepsetName(contentHash string) string {
return fmt.Sprintf("bazel_depset_%s", contentHash)
}
-
-func EnvironmentVarsFile(config Config) string {
- return fmt.Sprintf(bazel.GeneratedBazelFileWarning+`
-_env = %s
-
-env = _env
-`,
- starlark_fmt.PrintStringList(allowedBazelEnvironmentVars, 0),
- )
-}
diff --git a/bp2build/conversion.go b/bp2build/conversion.go
index f598332..d5f2386 100644
--- a/bp2build/conversion.go
+++ b/bp2build/conversion.go
@@ -73,7 +73,6 @@
files = append(files, newFile("api_levels", "platform_versions.bzl", platformVersionContents(cfg)))
files = append(files, newFile("allowlists", GeneratedBuildFileName, ""))
- files = append(files, newFile("allowlists", "env.bzl", android.EnvironmentVarsFile(cfg)))
// TODO(b/262781701): Create an alternate soong_build entrypoint for writing out these files only when requested
files = append(files, newFile("allowlists", "mixed_build_prod_allowlist.txt", strings.Join(android.GetBazelEnabledModules(android.BazelProdMode), "\n")+"\n"))
files = append(files, newFile("allowlists", "mixed_build_staging_allowlist.txt", strings.Join(android.GetBazelEnabledModules(android.BazelStagingMode), "\n")+"\n"))
diff --git a/bp2build/conversion_test.go b/bp2build/conversion_test.go
index 379f83b..00ffd79 100644
--- a/bp2build/conversion_test.go
+++ b/bp2build/conversion_test.go
@@ -167,10 +167,6 @@
},
{
dir: "allowlists",
- basename: "env.bzl",
- },
- {
- dir: "allowlists",
basename: "mixed_build_prod_allowlist.txt",
},
{
diff --git a/cc/binary.go b/cc/binary.go
index 98b9923..14f93e9 100644
--- a/cc/binary.go
+++ b/cc/binary.go
@@ -512,7 +512,7 @@
}
binary.baseInstaller.subDir = "bootstrap"
}
- binary.baseInstaller.installExecutable(ctx, file)
+ binary.baseInstaller.install(ctx, file)
var preferredArchSymlinkPath android.OptionalPath
for _, symlink := range binary.symlinks {
diff --git a/cc/config/riscv64_device.go b/cc/config/riscv64_device.go
index 77ee977..3bc1e69 100644
--- a/cc/config/riscv64_device.go
+++ b/cc/config/riscv64_device.go
@@ -29,14 +29,14 @@
// A temporary fix for SExtWRemoval miscompilation bug.
"-mllvm",
"-riscv-disable-sextw-removal=true",
- "-march=rv64gc_zba_zbb",
+ "-march=rv64gc_zba_zbb_zbs",
}
riscv64ArchVariantCflags = map[string][]string{}
riscv64Ldflags = []string{
"-Wl,--hash-style=gnu",
- "-march=rv64gc_zba_zbb",
+ "-march=rv64gc_zba_zbb_zbs",
}
riscv64Lldflags = append(riscv64Ldflags,
diff --git a/cc/installer.go b/cc/installer.go
index 716a0df..e2c0e7b 100644
--- a/cc/installer.go
+++ b/cc/installer.go
@@ -100,10 +100,6 @@
installer.path = ctx.InstallFile(installer.installDir(ctx), file.Base(), file)
}
-func (installer *baseInstaller) installExecutable(ctx ModuleContext, file android.Path) {
- installer.path = ctx.InstallExecutable(installer.installDir(ctx), file.Base(), file)
-}
-
func (installer *baseInstaller) everInstallable() bool {
// Most cc modules are installable.
return true
diff --git a/java/base.go b/java/base.go
index afb626a..6779283 100644
--- a/java/base.go
+++ b/java/base.go
@@ -1090,9 +1090,6 @@
srcJars = append(srcJars, aaptSrcJar)
}
srcJars = append(srcJars, j.properties.Generated_srcjars...)
- if len(j.properties.Generated_srcjars) > 0 {
- fmt.Printf("Java module %s Generated_srcjars: %v\n", ctx.ModuleName(), j.properties.Generated_srcjars)
- }
srcFiles = srcFiles.FilterOutByExt(".srcjar")
if j.properties.Jarjar_rules != nil {
diff --git a/rust/config/global.go b/rust/config/global.go
index 60acc6e..f838d0e 100644
--- a/rust/config/global.go
+++ b/rust/config/global.go
@@ -24,7 +24,7 @@
var pctx = android.NewPackageContext("android/soong/rust/config")
var (
- RustDefaultVersion = "1.69.0"
+ RustDefaultVersion = "1.70.0"
RustDefaultBase = "prebuilts/rust/"
DefaultEdition = "2021"
Stdlibs = []string{