From 2b2b87fe804c8f543e4af7f7cff9452f175ce04a Mon Sep 17 00:00:00 2001 From: Kousik Kumar Date: Tue, 14 Sep 2021 21:31:34 -0400 Subject: [PATCH] Ensure RBE_CXX_POOL and RBE_JAVA_POOL variables work as expected These environment variables are not being passed onto compile actions created from makefiles. This change makes sure that these env variables are passed along so that we are able to update the C++ / Javac pool being used Test: Ran a build with RBE_CXX_POOL=cpp_next to test the next pool Bug: b/199774309 Change-Id: Icd47d3647b962a6c3ac712369466d5502b817fd7 --- core/rbe.mk | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/core/rbe.mk b/core/rbe.mk index 19c0e4249a..370d4bd0e0 100644 --- a/core/rbe.mk +++ b/core/rbe.mk @@ -22,6 +22,18 @@ ifneq ($(filter-out false,$(USE_RBE)),) rbe_dir := prebuilts/remoteexecution-client/live/ endif + ifdef RBE_CXX_POOL + cxx_pool := $(RBE_CXX_POOL) + else + cxx_pool := default + endif + + ifdef RBE_JAVA_POOL + java_pool := $(RBE_JAVA_POOL) + else + java_pool := java16 + endif + ifdef RBE_CXX_EXEC_STRATEGY cxx_rbe_exec_strategy := $(RBE_CXX_EXEC_STRATEGY) else @@ -59,8 +71,8 @@ ifneq ($(filter-out false,$(USE_RBE)),) endif platform := container-image=docker://gcr.io/androidbuild-re-dockerimage/android-build-remoteexec-image@sha256:582efb38f0c229ea39952fff9e132ccbe183e14869b39888010dacf56b360d62 - cxx_platform := $(platform),Pool=default - java_r8_d8_platform := $(platform),Pool=java16 + cxx_platform := $(platform),Pool=$(cxx_pool) + java_r8_d8_platform := $(platform),Pool=$(java_pool) RBE_WRAPPER := $(rbe_dir)/rewrapper RBE_CXX := --labels=type=compile,lang=cpp,compiler=clang --env_var_allowlist=PWD --exec_strategy=$(cxx_rbe_exec_strategy) --platform=$(cxx_platform) --compare=$(cxx_compare)