Skip to content

Commit 8aad2a2

Browse files
committed
Auto merge of #40548 - alexcrichton:appveyor-ninja, r=brson
appveyor: Use Ninja to build LLVM on MinGW I have a suspicion that MinGW's make is the cause of #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 #40546 for real, but this is my current best shot at closing it out, so... Closes #40546
2 parents 8c4f2c6 + 6ae2234 commit 8aad2a2

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

appveyor.yml

+12-5
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ environment:
4343
# *not* use debug assertions and llvm assertions. This is because they take
4444
# too long on appveyor and this is tested by rustbuild below.
4545
- MSYS_BITS: 32
46-
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu
46+
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-ninja
4747
SCRIPT: python x.py test
4848
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci
4949
MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
5050
MINGW_DIR: mingw32
5151
- MSYS_BITS: 64
5252
SCRIPT: python x.py test
53-
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu
53+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-ninja
5454
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci
5555
MINGW_ARCHIVE: x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
5656
MINGW_DIR: mingw64
@@ -68,15 +68,15 @@ environment:
6868
SCRIPT: python x.py dist
6969
DEPLOY: 1
7070
- MSYS_BITS: 32
71-
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-extended
71+
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-extended --enable-ninja
7272
SCRIPT: python x.py dist
7373
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci
7474
MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
7575
MINGW_DIR: mingw32
7676
DEPLOY: 1
7777
- MSYS_BITS: 64
7878
SCRIPT: python x.py dist
79-
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-extended
79+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-extended --enable-ninja
8080
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci
8181
MINGW_ARCHIVE: x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
8282
MINGW_DIR: mingw64
@@ -116,9 +116,16 @@ install:
116116

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

122+
# Download and install ninja
123+
#
124+
# Note that this is originally from the github releases patch of Ninja
125+
- appveyor-retry appveyor DownloadFile https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-15-ninja-win.zip
126+
- 7z x 2017-03-15-ninja-win.zip
127+
# - set PATH=%PATH%;%CD% -- this already happens above for sccache
128+
122129
# Install InnoSetup to get `iscc` used to produce installers
123130
- appveyor-retry choco install -y InnoSetup
124131
- set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH%

src/bootstrap/config.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use std::process;
2323
use num_cpus;
2424
use rustc_serialize::Decodable;
2525
use toml::{Parser, Decoder, Value};
26-
use util::push_exe_path;
26+
use util::{exe, push_exe_path};
2727

2828
/// Global configuration for the entire build and/or bootstrap.
2929
///
@@ -584,10 +584,10 @@ impl Config {
584584
self.python = Some(path);
585585
}
586586
"CFG_ENABLE_CCACHE" if value == "1" => {
587-
self.ccache = Some("ccache".to_string());
587+
self.ccache = Some(exe("ccache", &self.build));
588588
}
589589
"CFG_ENABLE_SCCACHE" if value == "1" => {
590-
self.ccache = Some("sccache".to_string());
590+
self.ccache = Some(exe("sccache", &self.build));
591591
}
592592
"CFG_CONFIGURE_ARGS" if value.len() > 0 => {
593593
self.configure_args = value.split_whitespace()

0 commit comments

Comments
 (0)