about summary refs log tree commit diff
path: root/src/ci/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/ci/scripts')
-rwxr-xr-xsrc/ci/scripts/setup-environment.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ci/scripts/setup-environment.sh b/src/ci/scripts/setup-environment.sh
index e126a06edab..d134fcd47ba 100755
--- a/src/ci/scripts/setup-environment.sh
+++ b/src/ci/scripts/setup-environment.sh
@@ -8,6 +8,19 @@ IFS=$'\n\t'
 
 source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
 
+# Since matrix variables are readonly in Azure Pipelines, we take
+# INITIAL_RUST_CONFIGURE_ARGS and establish RUST_CONFIGURE_ARGS
+# which downstream steps can alter
+# macOS ships with Bash 3.16, so we cannot use [[ -v FOO ]],
+# which was introduced in Bash 4.2
+if [[ -z "${INITIAL_RUST_CONFIGURE_ARGS+x}" ]]; then
+    INITIAL_RUST_CONFIG=""
+    echo "No initial Rust configure args set"
+else
+    INITIAL_RUST_CONFIG="${INITIAL_RUST_CONFIGURE_ARGS}"
+    ciCommandSetEnv RUST_CONFIGURE_ARGS "${INITIAL_RUST_CONFIG}"
+fi
+
 # Builders starting with `dist-` are dist builders, but if they also end with
 # `-alt` they are alternate dist builders.
 if [[ "${CI_JOB_NAME}" = dist-* ]]; then