Skip to content

Commit

Permalink
Auto merge of rust-lang#39245 - alexcrichton:enable-platform, r=brson
Browse files Browse the repository at this point in the history
rustbuild: Start building --enable-extended

This commit adds a new flag to the configure script,
`--enable-extended`, which is intended for specifying a desire to
compile the full suite of Rust tools such as Cargo, the RLS, etc. This
is also an indication that the build system should create combined
installers such as the pkg/exe/msi artifacts.

Currently the `--enable-extended` flag just indicates that combined
installers should be built, and Cargo is itself not compiled just yet
but rather only downloaded from its location. The intention here is to
quickly get to feature parity with the current release process and then
we can start improving it afterwards.

All new files in this PR inside `src/etc/installer` are copied from the
rust-packaging repository.

cc rust-lang#38531
  • Loading branch information
bors committed Jan 24, 2017
2 parents 249b444 + f3dfcae commit 83c2d95
Show file tree
Hide file tree
Showing 36 changed files with 1,398 additions and 25 deletions.
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*.cpp rust
*.h rust
*.rs rust
src/etc/pkg/rust-logo.ico binary
src/etc/pkg/rust-logo.png binary
src/etc/installer/gfx/* binary
*.woff binary
src/vendor/* binary
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ matrix:
- env: >
SCRIPT="./x.py test && ./x.py dist"
RUST_CONFIGURE_ARGS=--build=i686-apple-darwin
RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-extended"
SRC=.
DEPLOY=1
os: osx
Expand All @@ -76,7 +76,7 @@ matrix:
after_failure: *osx_after_failure
- env: >
RUST_CHECK_TARGET=dist
RUST_CONFIGURE_ARGS=--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios
RUST_CONFIGURE_ARGS="--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-extended"
SRC=.
DEPLOY=1
os: osx
Expand Down
12 changes: 8 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ environment:
matrix:
# 32/64 bit MSVC
- MSYS_BITS: 64
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-extended
SCRIPT: python x.py test && python x.py dist
DEPLOY: 1
- MSYS_BITS: 32
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc --target=i586-pc-windows-msvc
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc --target=i586-pc-windows-msvc --enable-extended
SCRIPT: python x.py test --host i686-pc-windows-msvc --target i686-pc-windows-msvc && python x.py dist
DEPLOY: 1

Expand Down Expand Up @@ -51,7 +51,7 @@ 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-extended
SCRIPT: python x.py test && 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
Expand All @@ -67,7 +67,7 @@ environment:

- MSYS_BITS: 64
SCRIPT: python x.py test && python x.py dist
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-extended
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 @@ -103,6 +103,10 @@ install:
- 7z x -y sccache.tar > nul
- set PATH=%PATH%;%CD%\sccache2

# Install InnoSetup to get `iscc` used to produce installers
- choco install -y InnoSetup
- set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH%

# Help debug some handle issues on AppVeyor
- ps: Invoke-WebRequest -Uri https://download.sysinternals.com/files/Handle.zip -OutFile handle.zip
- mkdir handle
Expand Down
1 change: 1 addition & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ opt_nosave clang 0 "prefer clang to gcc for building the runtime"
opt_nosave jemalloc 1 "build liballoc with jemalloc"
opt elf-tls 1 "elf thread local storage on platforms where supported"
opt full-bootstrap 0 "build three compilers instead of two"
opt extended 0 "build an extended rust tool set"

valopt_nosave prefix "/usr/local" "set installation prefix"
valopt_nosave local-rust-root "/usr/local" "set prefix for local rust binary"
Expand Down
3 changes: 3 additions & 0 deletions src/bootstrap/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ pub fn collect(build: &mut Build) {
}
}

build.release_num = release_num.to_string();
build.prerelease_version = release_num.to_string();

// Depending on the channel, passed in `./configure --release-channel`,
// determine various properties of the build.
match &build.config.channel[..] {
Expand Down
4 changes: 4 additions & 0 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ pub struct Config {
pub vendor: bool,
pub target_config: HashMap<String, Target>,
pub full_bootstrap: bool,
pub extended: bool,

// llvm codegen options
pub llvm_assertions: bool,
Expand Down Expand Up @@ -140,6 +141,7 @@ struct Build {
nodejs: Option<String>,
python: Option<String>,
full_bootstrap: Option<bool>,
extended: Option<bool>,
}

/// TOML representation of various global install decisions.
Expand Down Expand Up @@ -276,6 +278,7 @@ impl Config {
set(&mut config.submodules, build.submodules);
set(&mut config.vendor, build.vendor);
set(&mut config.full_bootstrap, build.full_bootstrap);
set(&mut config.extended, build.extended);

if let Some(ref install) = toml.install {
config.prefix = install.prefix.clone().map(PathBuf::from);
Expand Down Expand Up @@ -412,6 +415,7 @@ impl Config {
("CODEGEN_TESTS", self.codegen_tests),
("VENDOR", self.vendor),
("FULL_BOOTSTRAP", self.full_bootstrap),
("EXTENDED", self.extended),
}

match key {
Expand Down
6 changes: 6 additions & 0 deletions src/bootstrap/config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@
# option to true.
#full-bootstrap = false

# Enable a build of the and extended rust tool set which is not only the
# compiler but also tools such as Cargo. This will also produce "combined
# installers" which are used to install Rust and Cargo together. This is
# disabled by default.
#extended = false

# =============================================================================
# General install configuration options
# =============================================================================
Expand Down
Loading

0 comments on commit 83c2d95

Please sign in to comment.