From 71e50180713eaaaa3bedc827e6890cede03baa0b Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Wed, 30 Oct 2019 12:26:02 +0100 Subject: 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. --- src/ci/scripts/install-clang.sh | 2 +- src/ci/scripts/install-mingw.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ci/scripts') 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 -- cgit 1.4.1-3-g733a5