aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaMont Jones <lamontjones@google.com>2023-01-11 23:41:36 +0000
committerLaMont Jones <lamontjones@google.com>2023-01-13 20:05:18 +0000
commitd1a32e99c80553cb5a13efcfc9e959ded34348fe (patch)
tree9ba16d87cf6c1334882f148863ca6b7da886ddab
parent62e81410091eb310657d94c92e6f03f751caf203 (diff)
downloadorchestrator-d1a32e99c80553cb5a13efcfc9e959ded34348fe.tar.gz
Drop workaround for pool name collisions.
The ninja fix is in aosp/2349845 Change-Id: I48c24d85490ce1156b01195f555e1af274ebcb17
-rw-r--r--core/final_packaging.py4
-rwxr-xr-xinner_build/inner_build_soong.py24
2 files changed, 6 insertions, 22 deletions
diff --git a/core/final_packaging.py b/core/final_packaging.py
index 85d1be6..fe6d4dd 100644
--- a/core/final_packaging.py
+++ b/core/final_packaging.py
@@ -33,10 +33,6 @@ def final_packaging(context, inner_trees):
ninja_syntax.Subninja(
context.out.api_ninja_file(base=context.out.Base.OUTER),
chDir=None))
- # TODO: Fix duplicate pool issue by creating the pool
- # only at the top-level file.
- # Pick an arbitrary value for depth.
- ninja.add_pool(ninja_syntax.Pool(name="highmem_pool", depth=20))
# For each inner tree
for tree in inner_trees.keys():
diff --git a/inner_build/inner_build_soong.py b/inner_build/inner_build_soong.py
index 5ca65a9..d831aa2 100755
--- a/inner_build/inner_build_soong.py
+++ b/inner_build/inner_build_soong.py
@@ -37,6 +37,9 @@ _ENV_VARS = {
"SKIP_VNDK_VARIANTS_CHECK": "true",
}
+# Default TARGET_PRODUCT. See bazel/rules/make_injection.bzl, and envsetup.sh.
+DEFAULT_TARGET_PRODUCT = "aosp_arm"
+
class InnerBuildSoong(common.Commands):
def __init__(self, env_vars=None):
@@ -78,26 +81,11 @@ class InnerBuildSoong(common.Commands):
f"{p.stderr.decode() if p.stderr else ''}")
sys.exit(p.returncode)
- # TODO: temp fix for duplicate pool error.
- # Soong uses a ninja pool called `highmem_pool` to have stricter control
- # on the execution of certain build actions.
- # When outer tree subninja's multiple inner_build ninja files, we get
- # a "duplicate pool" error.
- # Remove the pool from every inner ninja file, and create the pool in the
- # outer ninja file instead
- # Also, the orchestrator expects the file to exist at `inner_tree.ninja`
- product = os.environ.get("TARGET_PRODUCT", "aosp_arm") # default
+ # Deliver the innertree's ninja file at `inner_tree.ninja`.
+ product = os.environ.get("TARGET_PRODUCT", DEFAULT_TARGET_PRODUCT)
src_path = os.path.join(args.out_dir, f"combined-{product}.ninja")
dst_path = os.path.join(args.out_dir, f"inner_tree.ninja")
- with open(src_path, "r", encoding='iso-8859-1') as src:
- # the combined files is small enough, read everything into memory
- lines = src.readlines()
- lines_without_pool = [
- line for line in lines
- if "pool" not in line and "depth" not in line
- ]
- with open(dst_path, "w", encoding='iso-8859-1') as dst:
- dst.writelines(lines_without_pool)
+ shutil.copyfile(src_path, dst_path)
# TODO: Create an empty file for now. orchestrator will subninja the
# primary ninja file only if build_targets.json is not empty.