Skip to content

Commit

Permalink
Rollup merge of rust-lang#40548 - alexcrichton:appveyor-ninja, r=brson
Browse files Browse the repository at this point in the history
appveyor: Use Ninja to build LLVM on MinGW

I have a suspicion that MinGW's make is the cause of rust-lang#40546 rather than anything
else, but that's purely a suspicion without any facts to back it up. In any case
we'll eventually be moving the MSVC build over to Ninja in order to leverage
sccache regardless, so this commit simply jumpstarts that process by downloading
Ninja for use by MinGW anyway.

I'm not sure if this closes rust-lang#40546 for real, but this is my current best shot at
closing it out, so...

Closes rust-lang#40546
  • Loading branch information
frewsxcv authored Mar 22, 2017
2 parents 3f4ef9a + 6ae2234 commit fde6941
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
17 changes: 12 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ environment:
# *not* use debug assertions and llvm assertions. This is because they take
# too long on appveyor and this is tested by rustbuild below.
- MSYS_BITS: 32
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-ninja
SCRIPT: python x.py test
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci
MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
MINGW_DIR: mingw32
- MSYS_BITS: 64
SCRIPT: python x.py test
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-ninja
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci
MINGW_ARCHIVE: x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
MINGW_DIR: mingw64
Expand All @@ -68,15 +68,15 @@ environment:
SCRIPT: python x.py dist
DEPLOY: 1
- MSYS_BITS: 32
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-extended
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-extended --enable-ninja
SCRIPT: python x.py dist
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci
MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
MINGW_DIR: mingw32
DEPLOY: 1
- MSYS_BITS: 64
SCRIPT: python x.py dist
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-extended
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-extended --enable-ninja
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci
MINGW_ARCHIVE: x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
MINGW_DIR: mingw64
Expand Down Expand Up @@ -116,9 +116,16 @@ install:

# Download and install sccache
- appveyor-retry appveyor DownloadFile https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-16-sccache-x86_64-pc-windows-msvc
- mv 2017-03-16-sccache-x86_64-pc-windows-msvc sccache
- mv 2017-03-16-sccache-x86_64-pc-windows-msvc sccache.exe
- set PATH=%PATH%;%CD%

# Download and install ninja
#
# Note that this is originally from the github releases patch of Ninja
- appveyor-retry appveyor DownloadFile https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-15-ninja-win.zip
- 7z x 2017-03-15-ninja-win.zip
# - set PATH=%PATH%;%CD% -- this already happens above for sccache

# Install InnoSetup to get `iscc` used to produce installers
- appveyor-retry choco install -y InnoSetup
- set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH%
Expand Down
6 changes: 3 additions & 3 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use std::process;
use num_cpus;
use rustc_serialize::Decodable;
use toml::{Parser, Decoder, Value};
use util::push_exe_path;
use util::{exe, push_exe_path};

/// Global configuration for the entire build and/or bootstrap.
///
Expand Down Expand Up @@ -584,10 +584,10 @@ impl Config {
self.python = Some(path);
}
"CFG_ENABLE_CCACHE" if value == "1" => {
self.ccache = Some("ccache".to_string());
self.ccache = Some(exe("ccache", &self.build));
}
"CFG_ENABLE_SCCACHE" if value == "1" => {
self.ccache = Some("sccache".to_string());
self.ccache = Some(exe("sccache", &self.build));
}
"CFG_CONFIGURE_ARGS" if value.len() > 0 => {
self.configure_args = value.split_whitespace()
Expand Down

0 comments on commit fde6941

Please sign in to comment.