summary refs log tree commit diff
path: root/src/bootstrap/config.rs
AgeCommit message (Collapse)AuthorLines
2017-01-29Bootstrap: append libjemalloc_pic.aTatsuyuki Ishi-1/+1
Fix #35349
2017-01-25rustbuild: Add manifest generation in-treeAlex Crichton-0/+19
This commit adds a new tool, `build-manifest`, which is used to generate a distribution manifest of all produced artifacts. This tool is intended to replace the `build-rust-manifest.py` script that's currently located on the buildmaster. The intention is that we'll have a builder which periodically: * Downloads all artifacts for a commit * Runs `./x.py dist hash-and-sign`. This will generate `sha256` and `asc` files as well as TOML manifests. * Upload all generated hashes and manifests to the directory the artifacts came from. * Upload *all* artifacts (tarballs and hashes and manifests) to an archived location. * If necessary, upload all artifacts to the main location. This script is intended to just be the second step here where orchestrating uploads and such will all happen externally from the build system itself.
2017-01-24rustbuild: Start building --enable-extendedAlex Crichton-0/+4
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.
2017-01-20Fix rustbuild to work with --libdir.Matthew Dawson-0/+4
Similar to the makefiles, pass CFG_LIBDIR_RELATIVE to cargo when building rustc in stages > 0. This tells rustc to check the different directory.
2017-01-12Auto merge of #38654 - alexcrichton:rustbuild-destdir, r=brsonbors-9/+15
rustbuild: Implement DESTDIR support This commit primarily starts supporting the `DESTDIR` environment variable like the old build system. Along the way this brings `config.toml` up to date with support in `config.mk` with install options supported. Closes #38441
2017-01-10rustbuild: Don't enable debuginfo in rustcAlex Crichton-0/+4
In #37280 we enabled line number debugging information in release artifacts, primarily to close out #36452 where debugging information was critical for MSVC builds of Rust to be useful in production. This commit, however, apparently had some unfortunate side effects. Namely it was noticed in #37477 that if `RUST_BACKTRACE=1` was set then any compiler error would take a very long time for the compiler to exit. The cause of the problem here was somewhat deep: * For all compiler errors, the compiler will `panic!` with a known value. This tears down the main compiler thread and allows cleaning up all the various resources. By default, however, this panic output is suppressed for "normal" compiler errors. * When `RUST_BACKTRACE=1` was set this caused every compiler error to generate a backtrace. * The libbacktrace library hits a pathological case where it spends a very long time in its custom allocation function, `backtrace_alloc`, because the compiler has so much debugging information. More information about this can be found in #29293 with a summary at the end of #37477. To solve this problem this commit simply removes debuginfo from the compiler but not from the standard library. This should allow us to keep #36452 closed while also closing #37477. I've measured the difference to be orders of magnitude faster than it was before, so we should see a much quicker time-to-exit after a compile error when `RUST_BACKTRACE=1` is set. Closes #37477 Closes #37571
2016-12-30travis: Add a distcheck targetAlex Crichton-0/+6
This commit adds a new entry to the Travis matrix which performs a "distcheck", which basically means that we create a tarball, extract that tarball, and then build/test inside there. This ensures that the tarballs we produce are actually able to be built/tested! Along the way this also updates the rustbuild distcheck definition to propagate the configure args from the top-level invocation. Closes #38691
2016-12-29Merge branch 'rustbuild-llvm-targets' of https://github.com/xen0n/rust into ↵Alex Crichton-0/+3
rollup
2016-12-28rustbuild: Compile rustc twice, not thriceAlex Crichton-0/+4
This commit switches the rustbuild build system to compiling the compiler twice for a normal bootstrap rather than the historical three times. Rust is a bootstrapped language which means that a previous version of the compiler is used to build the next version of the compiler. Over time, however, we change many parts of compiler artifacts such as the metadata format, symbol names, etc. These changes make artifacts from one compiler incompatible from another compiler. Consequently if a compiler wants to be able to use some artifacts then it itself must have compiled the artifacts. Historically the rustc build system has achieved this by compiling the compiler three times: * An older compiler (stage0) is downloaded to kick off the chain. * This compiler now compiles a new compiler (stage1) * The stage1 compiler then compiles another compiler (stage2) * Finally, the stage2 compiler needs libraries to link against, so it compiles all the libraries again. This entire process amounts in compiling the compiler three times. Additionally, this process always guarantees that the Rust source tree can compile itself because the stage2 compiler (created by a freshly created compiler) would successfully compile itself again. This property, ensuring Rust can compile itself, is quite important! In general, though, this third compilation is not required for general purpose development on the compiler. The third compiler (stage2) can reuse the libraries that were created during the second compile. In other words, the second compilation can produce both a compiler and the libraries that compiler will use. These artifacts *must* be compatible due to the way plugins work today anyway, and they were created by the same source code so they *should* be compatible as well. So given all that, this commit switches the default build process to only compile the compiler three times, avoiding this third compilation by copying artifacts from the previous one. Along the way a new entry in the Travis matrix was also added to ensure that our full bootstrap can succeed. This entry does not run tests, though, as it should not be necessary. To restore the old behavior of a full bootstrap (three compiles) you can either pass: ./configure --enable-full-bootstrap or if you're using config.toml: [build] full-bootstrap = true Overall this will hopefully be an easy 33% win in build times of the compiler. If we do 33% less work we should be 33% faster! This in turn should affect cycle times and such on Travis and AppVeyor positively as well as making it easier to work on the compiler itself.
2016-12-29rustbuild: allow overriding list of LLVM targets to buildWang Xuerui-0/+3
A new option is introduced under the `[llvm]` section of `config.toml`, `targets`, for overriding the list of LLVM targets to build support for. The option is passed through to LLVM configure script. Also notes are added about the implications of (ab)using the option; since the default is not changed, and users of the option are expected to know what they're doing anyway (as every porter should), the impact should be minimal. Fixes #38200.
2016-12-28rustbuild: Implement DESTDIR supportAlex Crichton-9/+15
This commit primarily starts supporting the `DESTDIR` environment variable like the old build system. Along the way this brings `config.toml` up to date with support in `config.mk` with install options supported. Closes #38441
2016-12-20Rollup merge of #38388 - redox-os:config_toml_prefix, r=alexcrichtonAlex Crichton-0/+12
Add prefix to config.toml This allows `rustbuild` to be used to install to a prefix. ```toml [build] prefix = "/path/to/install" ``` For example, the following `config.toml` will cause `x.py dist --install` to install to `/path/to/install`
2016-12-19Remove trailing whitespaceJeremy Soller-1/+1
2016-12-19Move prefix to [install] sectionJeremy Soller-2/+12
2016-12-19add and document `--incremental` flag along with misc other changesNiko Matsakis-1/+9
For example: - we now support `-vv` to get very verbose output. - RUSTFLAGS is respected by `x.py` - better error messages for some cases
2016-12-15Add prefix to config.tomlJeremy Soller-0/+2
2016-12-14rustbuild: Add sccache supportAlex Crichton-4/+29
This commit adds support for sccache, a ccache-like compiler which works on MSVC and stores results into an S3 bucket. This also switches over all Travis and AppVeyor automation to using sccache to ensure a shared and unified cache over time which can be shared across builders. The support for sccache manifests as a new `--enable-sccache` option which instructs us to configure LLVM differently to use a 'sccache' binary instead of a 'ccache' binary. All docker images for Travis builds are updated to download Mozilla's tooltool builds of sccache onto various containers and systems. Additionally a new `rust-lang-ci-sccache` bucket is configured to hold all of our ccache goodies.
2016-11-19Auto merge of #37822 - cuviper:llvm-link-shared, r=alexcrichtonbors-0/+2
rustbuild: allow dynamically linking LLVM The makefiles and `mklldeps.py` called `llvm-config --shared-mode` to find out if LLVM defaulted to shared or static libraries, and just went with that. But under rustbuild, `librustc_llvm/build.rs` was assuming that LLVM should be static, and even forcing `--link-static` for 3.9+. Now that build script also uses `--shared-mode` to learn the default, which should work better for pre-3.9 configured for dynamic linking, as it wasn't possible back then to choose differently via `llvm-config`. Further, the configure script now has a new `--enable-llvm-link-shared` option, which allows one to manually override `--link-shared` on 3.9+ instead of forcing static. Update: There are now four static/shared scenarios that can happen for the supported LLVM versions: - 3.9+: By default use `llvm-config --link-static` - 3.9+ and `--enable-llvm-link-shared`: Use `--link-shared` instead. - 3.8: Use `llvm-config --shared-mode` and go with its answer. - 3.7: Just assume static, maintaining the status quo.
2016-11-18Auto merge of #37769 - alexcrichton:rustbuild-python, r=brsonbors-0/+7
rustbuild: Allow configuration of python interpreter Add a configuration key to `config.toml`, read it from `./configure`, and add auto-detection if none of those were specified. Closes #35760
2016-11-16rustbuild: allow dynamically linking LLVMJosh Stone-0/+2
The makefiles and `mklldeps.py` called `llvm-config --shared-mode` to find out if LLVM defaulted to shared or static libraries, and just went with that. But under rustbuild, `librustc_llvm/build.rs` was assuming that LLVM should be static, and even forcing `--link-static` for 3.9+. Now that build script also uses `--shared-mode` to learn the default, which should work better for pre-3.9 configured for dynamic linking, as it wasn't possible back then to choose differently via `llvm-config`. Further, the configure script now has a new `--enable-llvm-link-shared` option, which allows one to manually override `--link-shared` on 3.9+ instead of forcing static.
2016-11-14rustbuild: Allow configuration of python interpreterAlex Crichton-0/+7
Add a configuration key to `config.toml`, read it from `./configure`, and add auto-detection if none of those were specified. Closes #35760
2016-11-13Make LLVM debuginfo option names consistentA.J. Gardner-1/+1
2016-11-13Let rustbuild parse llvm debuginfo optionA.J. Gardner-0/+1
update_with_config_mk() needs to read the new llvm debuginfo config option from config.mk. Other than that, rustbuild already supports LLVM's RelWithDebInfo build type.
2016-11-12Auto merge of #37611 - Mark-Simulacrum:tari-nodejs-runner-detect, r=alexcrichtonbors-0/+2
compile-test: allow overriding nodejs binary location Add a command-line argument to manually specify which nodejs binary should be used, which disables the default search. Original work done by @tari. Fixes #34188.
2016-11-10compiletest: detect nodejs binary, allow overrideMark-Simulacrum-0/+2
Allow passing a custom nodejs directory in configure.
2016-11-10rustbuild: support RelWithDebInfo for llvmTim Neumann-0/+3
2016-11-08rustbuild: Tweak for vendored dependenciesAlex Crichton-0/+4
A few changes are included here: * The `winapi` and `url` dependencies were dropped. The source code for these projects is pretty weighty, and we're about to vendor them, so let's not commit to that intake just yet. If necessary we can vendor them later but for now it shouldn't be necessary. * The `--frozen` flag is now always passed to Cargo, obviating the need for tidy's `cargo_lock` check. * Tidy was updated to not check the vendor directory Closes #34687
2016-11-05Merge branch 'gdb-next-gen' of https://github.com/TimNN/rust into rollupAlex Crichton-15/+23
2016-11-05Fix tests from the rollupAlex Crichton-0/+24
2016-10-31rustbuild+configure: convert unix style paths on windowsTim Neumann-14/+37
2016-10-31rustbuild+configure: improve bin/exe joiningTim Neumann-3/+5
2016-10-31detect gdb version & rust support in compiletestTim Neumann-0/+6
2016-10-30Use quieter test output when running tests on Travis CI.Corey Farwell-0/+2
Fixes https://github.com/rust-lang/rust/issues/36788.
2016-10-19Enable line number debuginfo in releasesAlex Crichton-0/+4
This commit enables by default passing the `-C debuginfo=1` argument to the compiler for the stable, beta, and nightly release channels. A new configure option was also added, `--enable-debuginfo-lines`, to enable this behavior in developer builds as well. Closes #36452
2016-10-14Add AppVeyor configuration to the repoAlex Crichton-0/+2
We hope to move to AppVeyor in the near future off of Buildbot + EC2. This adds an `appveyor.yml` configuration file which is ready to run builds on the auto branch. This is also accompanied with a few minor fixes to the build system and such to accomodate AppVeyor. The intention is that we're not switching over to AppVeyor entirely just yet, but rather we'll watch the builds for a week or so. If everything checks out then we'll start gating on AppVeyor instead of Buildbot!
2016-10-11Auto merge of #36983 - alexcrichton:configure-multiple-musl, r=brsonbors-0/+30
configure: Add options for separate musl roots This allows using the `./configure` script to enable rustbuild to compile multiple musl targets at once. We'll hopefully use this soon on our bots to produce a bunch of targets.
2016-10-06Auto merge of #35641 - ahmedcharles:install, r=alexcrichtonbors-0/+12
rustbuild: Add install target. #34675 It just prints to the screen currently. r? @alexcrichton I'm working on the next commit to actually have it install.
2016-10-05Add support for docdir, libdir and mandir.Ahmed Charles-0/+12
2016-10-05configure: Add options for separate musl rootsAlex Crichton-0/+30
This allows using the `./configure` script to enable rustbuild to compile multiple musl targets at once. We'll hopefully use this soon on our bots to produce a bunch of targets.
2016-10-04rustbuild: Fix bug preventing per-target musl-rootNick Stevens-0/+2
In #36292, support was added to target musl libc for ARM targets using rustbuild. Specifically, that change allowed the addition of per-target "musl-root" options in the rustbuild config.toml so that multiple targets depending on musl could be built. However, that implementation contained a couple of omissions: the musl-root option was added to the config, but was never added to the TOML parsing, and therefore was not actually being loaded from config.toml. This commit rectifies that and allows successful building of musl-based ARM targets.
2016-09-28Move nodejs detection into bootstrapBrian Anderson-3/+0
This avoids issues with mingw path conversions.
2016-09-09Auto merge of #36256 - rjgoldsborough:make-configure-detect-nodejs-36207, ↵bors-0/+4
r=alexcrichton adding a check to bootstrap script and a check to the rust config script refs #36207 first crack at making configure detect nodejs
2016-09-07Auto merge of #36292 - japaric:musl-root, r=alexcrichtonbors-0/+2
rustbuild: per target musl-root config.toml now accepts a target.$TARGET.musl-root key that lets you override the "build" musl-root value, which is set via the --musl-root flag or via the build.musl-root key. With this change, it's now possible to compile std for several musl targets at once. Here's are the sample commands to do such thing: ``` $ configure \ --enable-rustbuild \ --target=x86_64-unknown-linux-musl,arm-unknown-linux-musleabi \ --musl-root=/musl/x86_64-unknown-linux-musl/ $ edit config.toml && tail config.toml [target.arm-unknown-linux-musleabi] musl-root = "/x-tools/arm-unknown-linux-musleabi/arm-unknown-linux-musleabi/sysroot/usr" $ make ``` r? @alexcrichton With this we should be able to start producing releases of std for arm musl targets
2016-09-07moving nodejs detection logic to configure and addingJake Goldsborough-0/+4
a nodejs cmd sanity check
2016-09-06detecting nodejs in configureJake Goldsborough-3/+0
2016-09-06rustbuild: per target musl-rootJorge Aparicio-0/+2
config.toml now accepts a target.$TARGET.musl-root key that lets you override the "build" musl-root value, which is set via the --musl-root flag or via the build.musl-root key. With this change, it's now possible to compile std for several musl targets at once. Here's are the sample commands to do such thing: ``` $ configure \ --enable-rustbuild \ --target=x86_64-unknown-linux-musl,arm-unknown-linux-musleabi \ --musl-root=/musl/x86_64-unknown-linux-musl/ $ edit config.toml && tail config.toml [target.arm-unknown-linux-musleabi] musl-root = "/x-tools/arm-unknown-linux-musleabi/arm-unknown-linux-musleabi/sysroot/usr" $ make ```
2016-09-03adding a check to bootstrap scriptJake Goldsborough-0/+3
and a check to the rust config script
2016-09-03rustbuild: add config.toml option to disable codegen testsAlex Burka-0/+2
2016-08-27rustbuild: skip filecheck check if codegen tests are disabledJorge Aparicio-0/+3
to match the behavior of the old Makefile-based build system closes #35752
2016-07-26rustbuild: make backtraces (RUST_BACKTRACE) optionalJorge Aparicio-0/+4
but keep them enabled by default to maintain the status quo. When disabled shaves ~56KB off every x86_64-unknown-linux-gnu binary. To disable backtraces you have to use a config.toml (see src/bootstrap/config.toml.example for details) when building rustc/std: $ python bootstrap.py --config=config.toml