about summary refs log tree commit diff
path: root/src/ci/scripts
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2019-10-30 12:26:02 +0100
committerPietro Albini <pietro@pietroalbini.org>2019-11-12 11:03:52 +0100
commit71e50180713eaaaa3bedc827e6890cede03baa0b (patch)
tree5187938a5e60f9c91d3dd7c55f9fb53a5fac400d /src/ci/scripts
parente3d998492abd7d61aba12cfa058fce28c998a3ff (diff)
downloadrust-71e50180713eaaaa3bedc827e6890cede03baa0b.tar.gz
rust-71e50180713eaaaa3bedc827e6890cede03baa0b.zip
ci: replace MINGW_URL with CUSTOM_MINGW=1
This commit replaces the mirrors base URL contained in the MINGW_URL
with a CUSTOM_MINGW=1 environment variable. The mirrors base URL will be
fetched instead through the MIRRORS_BASE environment variable, defined
in src/ci/shared.sh.
Diffstat (limited to 'src/ci/scripts')
-rwxr-xr-xsrc/ci/scripts/install-clang.sh2
-rwxr-xr-xsrc/ci/scripts/install-mingw.sh6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/ci/scripts/install-clang.sh b/src/ci/scripts/install-clang.sh
index b1e9bf92ca5..f0179994e8e 100755
--- a/src/ci/scripts/install-clang.sh
+++ b/src/ci/scripts/install-clang.sh
@@ -17,7 +17,7 @@ if isMacOS; then
     # Configure `AR` specifically so rustbuild doesn't try to infer it as
     # `clang-ar` by accident.
     ciCommandSetEnv AR "ar"
-elif isWindows && [[ -z ${MINGW_URL+x} ]]; then
+elif isWindows && [[ ${CUSTOM_MINGW-0} -ne 1 ]]; then
     # If we're compiling for MSVC then we, like most other distribution builders,
     # switch to clang as the compiler. This'll allow us eventually to enable LTO
     # amongst LLVM and rustc. Note that we only do this on MSVC as I don't think
diff --git a/src/ci/scripts/install-mingw.sh b/src/ci/scripts/install-mingw.sh
index b4e8b889f52..8b11e59fb63 100755
--- a/src/ci/scripts/install-mingw.sh
+++ b/src/ci/scripts/install-mingw.sh
@@ -28,7 +28,7 @@ IFS=$'\n\t'
 source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
 
 if isWindows; then
-    if [[ -z "${MINGW_URL+x}" ]]; then
+    if [[ "${CUSTOM_MINGW-0}" -ne 1 ]]; then
         arch=i686
         if [ "$MSYS_BITS" = "64" ]; then
           arch=x86_64
@@ -37,9 +37,9 @@ if isWindows; then
             mingw-w64-$arch-gcc mingw-w64-$arch-python2
         ciCommandAddPath "${SYSTEM_WORKFOLDER}/msys2/mingw${MSYS_BITS}/bin"
     else
-        curl -o mingw.7z "${MINGW_URL}/${MINGW_ARCHIVE}"
+        curl -o mingw.7z "${MIRRORS_BASE}/${MINGW_ARCHIVE}"
         7z x -y mingw.7z > /dev/null
-        curl -o "${MINGW_DIR}/bin/gdborig.exe" "${MINGW_URL}/2017-04-20-${MSYS_BITS}bit-gdborig.exe"
+        curl -o "${MINGW_DIR}/bin/gdborig.exe" "${MIRRORS_BASE}/2017-04-20-${MSYS_BITS}bit-gdborig.exe"
         ciCommandAddPath "$(pwd)/${MINGW_DIR}/bin"
     fi
 fi