diff options
author | LaMont Jones <lamontjones@google.com> | 2023-03-14 22:35:51 +0000 |
---|---|---|
committer | LaMont Jones <lamontjones@google.com> | 2023-03-15 00:37:20 +0000 |
commit | 786578ebf84bdff2dfa21a3950904f881005a07a (patch) | |
tree | 869c21927d024e5c0ce13bc02b3036aa65560ec3 | |
parent | f15754c527fd71cda6a40f8b9641df3ffc77d356 (diff) | |
download | orchestrator-786578ebf84bdff2dfa21a3950904f881005a07a.tar.gz |
inner_build: add --multitree-build to soong invocations
When running soong in the inner-tree, tell it that this is a multitree
build.
Bug: b/266730267
Test: treehugger, manual
Change-Id: Id7e42cda7975ba6ef4b83ad94150e8737e9e7506
-rwxr-xr-x | inner_build/inner_build_soong.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/inner_build/inner_build_soong.py b/inner_build/inner_build_soong.py index a8a17d4..b11cc32 100755 --- a/inner_build/inner_build_soong.py +++ b/inner_build/inner_build_soong.py @@ -71,10 +71,8 @@ class InnerBuildSoong(common.Commands): """Run analysis on this tree.""" cmd = [ "build/soong/soong_ui.bash", "--build-mode", - f"--dir={args.inner_tree}", "-all-modules", - "--skip-soong-tests", - "nothing", - "--search-api-dir" + f"--dir={args.inner_tree}", "-all-modules", "nothing", + "--skip-soong-tests", "--search-api-dir", "--multitree-build" ] p = subprocess.run(cmd, shell=False, check=False) @@ -85,8 +83,7 @@ class InnerBuildSoong(common.Commands): # Capture the environment variables passed by soong_ui to single-tree # ninja. - env_path = os.path.join(args.out_dir, 'soong', - 'ninja.environment') + env_path = os.path.join(args.out_dir, 'soong', 'ninja.environment') with open(env_path, "r", encoding='iso-8859-1') as f: try: env_json = json.load(f) @@ -112,7 +109,8 @@ class InnerBuildSoong(common.Commands): class ApiMetadataFile(object): """Utility class that wraps the generated API surface metadata files""" - def __init__(self, inner_tree: str, path: str, bazel_output_user_root: str): + def __init__(self, inner_tree: str, path: str, + bazel_output_user_root: str): self.inner_tree = inner_tree self.path = path self.bazel_output_user_root = bazel_output_user_root @@ -307,6 +305,7 @@ class ApiExporterBazel(object): f"--dir={self.inner_tree}", "api_bp2build", "--skip-soong-tests", + "--multitree-build", "--search-api-dir", # This ensures that Android.bp.list remains the same in the analysis step. ] return self._run_cmd(cmd, **kwargs) |