Add the ability to source RBE related scripts from envsetup.sh
This is so that developers don't have to remember to source a separate script to source RBE related variables. I'll modify the docs once this change is submitted. Test: Ran forrest build with fix for previous build failure - https://android-build.googleplex.com/builds/abtd/run/L72300000950316038 Bug: b/193407413 Change-Id: I16f057086e2ee4f5918816ea70dbb33d0f5e99ab
This commit is contained in:
parent
663d0ffdde
commit
721533e0d6
10
envsetup.sh
10
envsetup.sh
@ -1871,6 +1871,16 @@ function showcommands() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Source necessary setup scripts needed to run the build with Remote Execution.
|
||||||
|
function source_rbe() {
|
||||||
|
local T=$(gettop)
|
||||||
|
|
||||||
|
if [[ "x$USE_RBE" != "x" && "$USE_RBE" != "false" ]]; then
|
||||||
|
. $T/build/make/rbesetup.sh --skip-envsetup
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
validate_current_shell
|
validate_current_shell
|
||||||
source_vendorsetup
|
source_vendorsetup
|
||||||
|
source_rbe
|
||||||
addcompletions
|
addcompletions
|
||||||
|
@ -24,8 +24,11 @@ function _source_env_setup_script() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# This function needs to run first as the remaining defining functions may be
|
# This function needs to run first as the remaining defining functions may be
|
||||||
# using the envsetup.sh defined functions.
|
# using the envsetup.sh defined functions. Skip this part if this script is already
|
||||||
_source_env_setup_script || return
|
# being invoked from envsetup.sh.
|
||||||
|
if [[ "$1" != "--skip-envsetup" ]]; then
|
||||||
|
_source_env_setup_script || return
|
||||||
|
fi
|
||||||
|
|
||||||
# This function prefixes the given command with appropriate variables needed
|
# This function prefixes the given command with appropriate variables needed
|
||||||
# for the build to be executed with RBE.
|
# for the build to be executed with RBE.
|
||||||
|
Loading…
Reference in New Issue
Block a user