aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2021-01-15 19:15:17 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2021-01-15 19:15:17 +0000
commit3f6ea452488a307e9d3dfdac781223621a3962b7 (patch)
treed07e9a62254e703821ba01013799796770557b28
parentfb9127fcfefa2effac8e96fbb3df2eed46773f2c (diff)
parentb571c86e234a83453b578ce622e9500ff73c44c7 (diff)
downloadbuild-android-mainline-10.0.0_r12.tar.gz
Snap for 7084909 from b571c86e234a83453b578ce622e9500ff73c44c7 to qt-aml-tzdata-releaseandroid-mainline-10.0.0_r12
Change-Id: Icc7b9b0ccc0816a2ff817607843581a8949b826f
-rw-r--r--core/version_defaults.mk2
-rw-r--r--rbesetup.sh38
2 files changed, 36 insertions, 4 deletions
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index 251f2a87f4..a6347a1ba0 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -250,7 +250,7 @@ ifndef PLATFORM_SECURITY_PATCH
# It must be of the form "YYYY-MM-DD" on production devices.
# It must match one of the Android Security Patch Level strings of the Public Security Bulletins.
# If there is no $PLATFORM_SECURITY_PATCH set, keep it empty.
- PLATFORM_SECURITY_PATCH := 2021-01-01
+ PLATFORM_SECURITY_PATCH := 2021-03-01
endif
.KATI_READONLY := PLATFORM_SECURITY_PATCH
diff --git a/rbesetup.sh b/rbesetup.sh
index 5781f05e4c..da257b9946 100644
--- a/rbesetup.sh
+++ b/rbesetup.sh
@@ -1,4 +1,32 @@
-source build/envsetup.sh
+function _source_env_setup_script() {
+ local -r ENV_SETUP_SCRIPT="build/make/envsetup.sh"
+ local -r TOP_DIR=$(
+ while [[ ! -f "${ENV_SETUP_SCRIPT}" ]] && [[ "${PWD}" != "/" ]]; do
+ \cd ..
+ done
+ if [[ -f "${ENV_SETUP_SCRIPT}" ]]; then
+ echo "$(PWD= /bin/pwd -P)"
+ fi
+ )
+
+ local -r FULL_PATH_ENV_SETUP_SCRIPT="${TOP_DIR}/${ENV_SETUP_SCRIPT}"
+ if [[ ! -f "${FULL_PATH_ENV_SETUP_SCRIPT}" ]]; then
+ echo "ERROR: Unable to source ${ENV_SETUP_SCRIPT}"
+ return 1
+ fi
+
+ # Need to change directory to the repo root so vendor scripts can be sourced
+ # as well.
+ local -r CUR_DIR=$PWD
+ \cd "${TOP_DIR}"
+ source "${FULL_PATH_ENV_SETUP_SCRIPT}"
+ \cd "${CUR_DIR}"
+}
+
+# This function needs to run first as the remaining defining functions may be
+# using the envsetup.sh defined functions.
+_source_env_setup_script || return
+
# This function prefixes the given command with appropriate variables needed
# for the build to be executed with RBE.
function use_rbe() {
@@ -25,7 +53,7 @@ function use_rbe() {
# ANDROID_ENABLE_METRICS_UPLOAD.
function _export_metrics_uploader() {
local uploader_path="$(gettop)/vendor/google/misc/metrics_uploader_prebuilt/metrics_uploader.sh"
- if [ -x "${uploader_path}" ]; then
+ if [[ -x "${uploader_path}" ]]; then
export ANDROID_ENABLE_METRICS_UPLOAD="${uploader_path}"
fi
}
@@ -34,7 +62,11 @@ function _export_metrics_uploader() {
function _set_rbe_vars() {
unset USE_GOMA
export USE_RBE="true"
- export RBE_CXX_EXEC_STRATEGY="remote_local_fallback"
+ export RBE_CXX_EXEC_STRATEGY="racing"
+ export RBE_JAVAC_EXEC_STRATEGY="racing"
+ export RBE_R8_EXEC_STRATEGY="racing"
+ export RBE_D8_EXEC_STRATEGY="racing"
+ export RBE_use_unified_cas_ops="true"
export RBE_JAVAC=1
export RBE_R8=1
export RBE_D8=1