diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-09-15 23:30:27 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-09-15 23:30:27 +0000 |
commit | 9bd7223ab7bca681da7bb8a1a413f114bae5c6a0 (patch) | |
tree | ab69522d9792b06fd478f3ea3dc8c3c021f1cad5 | |
parent | 461c0d46205e20f125b93e0392ba47de5c064d57 (diff) | |
parent | 4d158b5f32e526a3963643b4b41ad5ccf8c27385 (diff) | |
download | build-9bd7223ab7bca681da7bb8a1a413f114bae5c6a0.tar.gz |
Merge "Add function to export default values for RBE related variables" into rvc-dev
-rw-r--r-- | rbesetup.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/rbesetup.sh b/rbesetup.sh index 7e9b2ea4e9..25a1703075 100644 --- a/rbesetup.sh +++ b/rbesetup.sh @@ -23,3 +23,25 @@ function use_rbe() { RBE_re_proxy="${RBE_BINARIES_DIR}/reproxy" \ $@ } + +# This function detects if the uploader is available and sets the path of it to +# 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 + export ANDROID_ENABLE_METRICS_UPLOAD="${uploader_path}" + fi +} + +# This function sets RBE specific environment variables needed for the build to +# executed by RBE. This file should be sourced once per checkout of Android code. +function _set_rbe_vars() { + export USE_RBE="true" + export RBE_CXX_EXEC_STRATEGY="remote_local_fallback" + export RBE_JAVAC=1 + export RBE_R8=1 + export RBE_D8=1 +} + +_export_metrics_uploader +_set_rbe_vars |