Skip to content

Commit f3dfcae

Browse files
committed
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.
1 parent c2a0d1b commit f3dfcae

36 files changed

+1398
-25
lines changed

.gitattributes

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*.cpp rust
55
*.h rust
66
*.rs rust
7-
src/etc/pkg/rust-logo.ico binary
8-
src/etc/pkg/rust-logo.png binary
7+
src/etc/installer/gfx/* binary
98
*.woff binary
109
src/vendor/* binary

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ matrix:
5757
5858
- env: >
5959
SCRIPT="./x.py test && ./x.py dist"
60-
RUST_CONFIGURE_ARGS=--build=i686-apple-darwin
60+
RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-extended"
6161
SRC=.
6262
DEPLOY=1
6363
os: osx
@@ -76,7 +76,7 @@ matrix:
7676
after_failure: *osx_after_failure
7777
- env: >
7878
RUST_CHECK_TARGET=dist
79-
RUST_CONFIGURE_ARGS=--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios
79+
RUST_CONFIGURE_ARGS="--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-extended"
8080
SRC=.
8181
DEPLOY=1
8282
os: osx

appveyor.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ environment:
77
matrix:
88
# 32/64 bit MSVC
99
- MSYS_BITS: 64
10-
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc
10+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-extended
1111
SCRIPT: python x.py test && python x.py dist
1212
DEPLOY: 1
1313
- MSYS_BITS: 32
14-
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc --target=i586-pc-windows-msvc
14+
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc --target=i586-pc-windows-msvc --enable-extended
1515
SCRIPT: python x.py test --host i686-pc-windows-msvc --target i686-pc-windows-msvc && python x.py dist
1616
DEPLOY: 1
1717

@@ -51,7 +51,7 @@ environment:
5151
# *not* use debug assertions and llvm assertions. This is because they take
5252
# too long on appveyor and this is tested by rustbuild below.
5353
- MSYS_BITS: 32
54-
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu
54+
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-extended
5555
SCRIPT: python x.py test && python x.py dist
5656
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci
5757
MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
@@ -67,7 +67,7 @@ environment:
6767

6868
- MSYS_BITS: 64
6969
SCRIPT: python x.py test && python x.py dist
70-
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu
70+
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-extended
7171
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci
7272
MINGW_ARCHIVE: x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
7373
MINGW_DIR: mingw64
@@ -103,6 +103,10 @@ install:
103103
- 7z x -y sccache.tar > nul
104104
- set PATH=%PATH%;%CD%\sccache2
105105

106+
# Install InnoSetup to get `iscc` used to produce installers
107+
- choco install -y InnoSetup
108+
- set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH%
109+
106110
# Help debug some handle issues on AppVeyor
107111
- ps: Invoke-WebRequest -Uri https://download.sysinternals.com/files/Handle.zip -OutFile handle.zip
108112
- mkdir handle

configure

+1
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,7 @@ opt_nosave clang 0 "prefer clang to gcc for building the runtime"
707707
opt_nosave jemalloc 1 "build liballoc with jemalloc"
708708
opt elf-tls 1 "elf thread local storage on platforms where supported"
709709
opt full-bootstrap 0 "build three compilers instead of two"
710+
opt extended 0 "build an extended rust tool set"
710711

711712
valopt_nosave prefix "/usr/local" "set installation prefix"
712713
valopt_nosave local-rust-root "/usr/local" "set prefix for local rust binary"

src/bootstrap/channel.rs

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ pub fn collect(build: &mut Build) {
4040
}
4141
}
4242

43+
build.release_num = release_num.to_string();
44+
build.prerelease_version = release_num.to_string();
45+
4346
// Depending on the channel, passed in `./configure --release-channel`,
4447
// determine various properties of the build.
4548
match &build.config.channel[..] {

src/bootstrap/config.rs

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ pub struct Config {
4747
pub vendor: bool,
4848
pub target_config: HashMap<String, Target>,
4949
pub full_bootstrap: bool,
50+
pub extended: bool,
5051

5152
// llvm codegen options
5253
pub llvm_assertions: bool,
@@ -140,6 +141,7 @@ struct Build {
140141
nodejs: Option<String>,
141142
python: Option<String>,
142143
full_bootstrap: Option<bool>,
144+
extended: Option<bool>,
143145
}
144146

145147
/// TOML representation of various global install decisions.
@@ -276,6 +278,7 @@ impl Config {
276278
set(&mut config.submodules, build.submodules);
277279
set(&mut config.vendor, build.vendor);
278280
set(&mut config.full_bootstrap, build.full_bootstrap);
281+
set(&mut config.extended, build.extended);
279282

280283
if let Some(ref install) = toml.install {
281284
config.prefix = install.prefix.clone().map(PathBuf::from);
@@ -412,6 +415,7 @@ impl Config {
412415
("CODEGEN_TESTS", self.codegen_tests),
413416
("VENDOR", self.vendor),
414417
("FULL_BOOTSTRAP", self.full_bootstrap),
418+
("EXTENDED", self.extended),
415419
}
416420

417421
match key {

src/bootstrap/config.toml.example

+6
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@
118118
# option to true.
119119
#full-bootstrap = false
120120

121+
# Enable a build of the and extended rust tool set which is not only the
122+
# compiler but also tools such as Cargo. This will also produce "combined
123+
# installers" which are used to install Rust and Cargo together. This is
124+
# disabled by default.
125+
#extended = false
126+
121127
# =============================================================================
122128
# General install configuration options
123129
# =============================================================================

0 commit comments

Comments
 (0)