about summary refs log tree commit diff
path: root/src/bootstrap/bin/rustc.rs
AgeCommit message (Collapse)AuthorLines
2019-03-05Bootstrap changesJohn Kåre Alsaker-7/+14
2019-02-28Introduce rustc_interface and move some methods thereJohn Kåre Alsaker-0/+2
2019-02-25Remove some unnecessary 'extern crate'Taiki Endo-2/+0
2019-01-28Use multiple threads by default. Limits tests to one thread. Do some renaming.John Kåre Alsaker-2/+2
2018-12-25Remove licensesMark Rousskov-10/+0
2018-11-30bootstrap: don't use libraries from MUSL_ROOT on non-musl targets.Eduard-Mihai Burtescu-4/+6
2018-11-06Auto merge of #55106 - petrhosek:fuchsia-lld, r=alexcrichtonbors-1/+3
Use lld directly for Fuchsia target Fuchsia already uses lld as the default linker, so there's no reason to always invoke it through Clang, instead we can simply invoke lld directly and pass the set of flags that matches Clang.
2018-11-05Use lld directly for Fuchsia targetPetr Hosek-1/+3
Fuchsia already uses lld as the default linker, so there's no reason to always invoke it through Clang, instead we can simply invoke lld directly and pass the set of flags that matches Clang.
2018-10-29don't forget to sync these flags with miriRalf Jung-0/+2
2018-10-29Emit Retag statements, kill Validate statementsRalf Jung-1/+6
Also "rename" -Zmir-emit-validate to -Zmir-emit-retag, which is just a boolean (yes or no).
2018-10-13Improve verify_llvm_ir config optionNikita Popov-4/+0
* Make it influence the behavior of the compiled rustc, rather than just the rustc build system. That is, if verify_llvm_ir=true, even manual invocations of the built rustc will verify LLVM IR. * Enable verification of LLVM IR in CI, for non-deploy and deploy-alt builds. This is similar to how LLVM assertions are handled.
2018-09-18rustbuild: drop color handlingMarc-Antoine Perennou-9/+0
Let cargo handle that for us Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2018-09-10Add rustc SHA to released DWARF debuginfoAlex Crichton-0/+4
This commit updates the debuginfo that is encoded in all of our released artifacts by default. Currently it has paths like `/checkout/src/...` but these are a little inconsistent and have changed over time. This commit instead attempts to actually define the file paths in our debuginfo to be consistent between releases. All debuginfo paths are now intended to be `/rustc/$sha` where `$sha` is the git sha of the released compiler. Sub-paths are all paths into the git repo at that `$sha`.
2018-07-25Discriminate between external and optional toolsTatsuyuki Ishi-1/+2
2018-07-25Deny bare_trait_objects globallyTatsuyuki Ishi-1/+2
2018-07-23Replace a few expect+format combos with unwrap_or_else+panicljedrz-2/+2
2018-06-12Add verify-llvm-ir flag to config.tomlNikita Popov-0/+4
2018-05-31bootstrap: pass crt-static for the compiler host as wellJohannes Nixdorf-0/+9
2018-05-19Auto merge of #50709 - alexcrichton:revert-musl, r=sfacklerbors-9/+0
Revert #50105 until regression is fixed Discovered at https://github.com/rust-lang/rust/pull/50105#issuecomment-388630750 it looks like this caused a regression with i686 musl, so let's revert in the meantime while a fix is worked out
2018-05-17Revert "bootstrap: pass crt-static for the compiler host as well"Alex Crichton-9/+0
This reverts commit ec2b861c2f8013e10ab1f6e01c9aed9ad1daaefe.
2018-05-17Add `bless` x.py subcommand for easy ui test replacementOliver Schneider-1/+6
2018-05-11Auto merge of #50105 - mixi:crt-included, r=alexcrichtonbors-0/+9
Use the correct crt*.o files when linking musl targets. This is supposed to support optionally using the system copy of musl libc instead of the included one if supported. This currently only affects the start files, which is enough to allow building rustc on musl targets. Most of the changes are analogous to crt-static. Excluding the start files is something musl based distributions usually patch into their copy of rustc: - https://github.com/alpinelinux/aports/blob/eb064c8/community/rust/musl-fix-linux_musl_base.patch - https://github.com/voidlinux/void-packages/blob/77400fc/srcpkgs/rust/patches/link-musl-dynamically.patch For third-party distributions that not yet carry those patches it would be nice if it was supported without the need to patch upstream sources. ## Reasons ### What breaks? Some start files were missed when originally writing the logic to swap in musl start files (gcc comes with its own start files, which are suppressed by -nostdlib, but not manually included later on). This caused #36710, which also affects rustc with the internal llvm copy or any other system libraries that need crtbegin/crtend. ### How is it fixed? The system linker already has all the logic to decide which start files to include, so we can just defer to it (except of course if it doesn't target musl). ### Why is it optional? In #40113 it was first tried to remove the start files, which broke compiling musl-targeting static binaries with a glibc-targeting compiler. This is why it eventually landed without removing the start files. Being an option side-steps the issue. ### Why are the start files still installed? This has the nice side-effect, that the produced rust-std-* binaries can still be used by on a glibc-targeting system with a rustc built against glibc. ## Does it work? With the following build script (using [musl-cross-make](https://github.com/richfelker/musl-cross-make)): https://shadowice.org/~mixi/rust-musl/build.sh, I was able to cross-compile a musl-host musl-targeting rustc on a glibc-based system. The resulting binaries are at https://shadowice.org/~mixi/rust-musl/binaries/. This also requires #50103 and #50104 (which are also applied to the branch the build script uses).
2018-05-05Misc tweaksJohn Kåre Alsaker-0/+7
2018-04-29bootstrap: pass crt-static for the compiler host as wellJohannes Nixdorf-0/+9
2018-04-13Remove -Z miri debugging optionFabio B-3/+0
2018-04-08Move deny(warnings) into rustbuildMark Simulacrum-0/+4
This permits easier iteration without having to worry about warnings being denied. Fixes #49517
2018-03-20ci: Print out how long each step takes on CIAlex Crichton-20/+45
This commit updates CI configuration to inform rustbuild that it should print out how long each step takes on CI. This'll hopefully allow us to track the duration of steps over time and follow regressions a bit more closesly (as well as have closer analysis of differences between two builds). cc #48829
2018-03-16Rollup merge of #48892 - alexcrichton:thinlto-again, r=Mark-Simulacrumkennytm-3/+0
rustbuild: Remove ThinLTO-related configuration This commit removes some ThinLTO/codegen unit cruft primarily only needed during the initial phase where we were adding ThinLTO support to rustc itself. The current bootstrap compiler knows about ThinLTO and has it enabled by default for multi-CGU builds which are also enabled by default. One CGU builds (aka disabling ThinLTO) can be achieved by configuring the number of codegen units to 1 for a particular builds. This also changes the defaults for our dist builders to go back to multiple CGUs. Unfortunately we're seriously bleeding for cycle time on the bots right now so we need to recover any time we can.
2018-03-09rustbuild: Remove ThinLTO-related configurationAlex Crichton-3/+0
This commit removes some ThinLTO/codegen unit cruft primarily only needed during the initial phase where we were adding ThinLTO support to rustc itself. The current bootstrap compiler knows about ThinLTO and has it enabled by default for multi-CGU builds which are also enabled by default. One CGU builds (aka disabling ThinLTO) can be achieved by configuring the number of codegen units to 1 for a particular builds. This also changes the defaults for our dist builders to go back to multiple CGUs. Unfortunately we're seriously bleeding for cycle time on the bots right now so we need to recover any time we can.
2018-03-08Print out the sysroot and libdir on verbose builds.Mark Simulacrum-2/+4
2018-03-03rust: Import LLD for linking wasm objectsAlex Crichton-1/+1
This commit imports the LLD project from LLVM to serve as the default linker for the `wasm32-unknown-unknown` target. The `binaryen` submoule is consequently removed along with "binaryen linker" support in rustc. Moving to LLD brings with it a number of benefits for wasm code: * LLD is itself an actual linker, so there's no need to compile all wasm code with LTO any more. As a result builds should be *much* speedier as LTO is no longer forcibly enabled for all builds of the wasm target. * LLD is quickly becoming an "official solution" for linking wasm code together. This, I believe at least, is intended to be the main supported linker for native code and wasm moving forward. Picking up support early on should help ensure that we can help LLD identify bugs and otherwise prove that it works great for all our use cases! * Improvements to the wasm toolchain are currently primarily focused around LLVM and LLD (from what I can tell at least), so it's in general much better to be on this bandwagon for bugfixes and new features. * Historical "hacks" like `wasm-gc` will soon no longer be necessary, LLD will [natively implement][gc] `--gc-sections` (better than `wasm-gc`!) which means a postprocessor is no longer needed to show off Rust's "small wasm binary size". LLD is added in a pretty standard way to rustc right now. A new rustbuild target was defined for building LLD, and this is executed when a compiler's sysroot is being assembled. LLD is compiled against the LLVM that we've got in tree, which means we're currently on the `release_60` branch, but this may get upgraded in the near future! LLD is placed into rustc's sysroot in a `bin` directory. This is similar to where `gcc.exe` can be found on Windows. This directory is automatically added to `PATH` whenever rustc executes the linker, allowing us to define a `WasmLd` linker which implements the interface that `wasm-ld`, LLD's frontend, expects. Like Emscripten the LLD target is currently only enabled for Tier 1 platforms, notably OSX/Windows/Linux, and will need to be installed manually for compiling to wasm on other platforms. LLD is by default turned off in rustbuild, and requires a `config.toml` option to be enabled to turn it on. Finally the unstable `#![wasm_import_memory]` attribute was also removed as LLD has a native option for controlling this. [gc]: https://reviews.llvm.org/D42511
2018-02-24Added error-format flag to x.py.penpalperson-0/+5
2018-01-23Add ./x.py check src/{libstd,libtest,rustc}.Mark Simulacrum-5/+0
This currently only supports a limited subset of the full compilation, but is likely 90% of what people will want and is possible without building a full compiler (i.e., running LLVM). In theory, this means that contributors who don't want to build LLVM now have an easy way to compile locally, though running tests won't work.
2017-12-17Add sync module to rustc_data_structuresJohn Kåre Alsaker-0/+4
2017-12-12Put miri const eval checking behind -ZmiriOliver Schneider-0/+3
2017-12-06Update miri to rustc changesOliver Schneider-12/+14
2017-09-17-Zmir-emit-validate is in stage 0Oliver Schneider-1/+1
2017-09-17Get the miri test suite to run inside the rustc dev environmentOliver Schneider-0/+6
2017-08-22Inline crt-static choice for pc-windows-msvcSamuel Holland-5/+0
This avoids the possibility of a duplicate or conflicting crt-static command line option sent to rustc.
2017-08-22Introduce crt_static target option in config.tomlSamuel Holland-0/+9
This controls the value of the crt-static feature used when building the standard library for a target, as well as the compiler itself when that target is the host.
2017-08-03Appease tidy and fix save-analysis config for dist buildsNick Cameron-1/+1
2017-07-24Remove save-analysis-api references from tests and rustbuildNick Cameron-1/+4
2017-07-16Compile `compiler_builtins` with `abort` panic strategyVadim Petrochenkov-1/+6
2017-07-06Auto merge of #42899 - alexcrichton:compiler-builtins, r=nikomatsakisbors-4/+15
Switch to rust-lang-nursery/compiler-builtins This commit migrates the in-tree `libcompiler_builtins` to the upstream version at https://github.com/rust-lang-nursery/compiler-builtins. The upstream version has a number of intrinsics written in Rust and serves as an in-progress rewrite of compiler-rt into Rust. Additionally it also contains all the existing intrinsics defined in `libcompiler_builtins` for 128-bit integers. It's been the intention since the beginning to make this transition but previously it just lacked the manpower to get done. As this PR likely shows it wasn't a trivial integration! Some highlight changes are: * The PR rust-lang-nursery/compiler-builtins#166 contains a number of fixes across platforms and also some refactorings to make the intrinsics easier to read. The additional testing added there also fixed a number of integration issues when pulling the repository into this tree. * LTO with the compiler-builtins crate was fixed to link in the entire crate after the LTO process as these intrinsics are excluded from LTO. * Treatment of hidden symbols was updated as previously the `#![compiler_builtins]` crate would mark all symbol *imports* as hidden whereas it was only intended to mark *exports* as hidden.
2017-07-05Switch to rust-lang-nursery/compiler-builtinsAlex Crichton-4/+15
This commit migrates the in-tree `libcompiler_builtins` to the upstream version at https://github.com/rust-lang-nursery/compiler-builtins. The upstream version has a number of intrinsics written in Rust and serves as an in-progress rewrite of compiler-rt into Rust. Additionally it also contains all the existing intrinsics defined in `libcompiler_builtins` for 128-bit integers. It's been the intention since the beginning to make this transition but previously it just lacked the manpower to get done. As this PR likely shows it wasn't a trivial integration! Some highlight changes are: * The PR rust-lang-nursery/compiler-builtins#166 contains a number of fixes across platforms and also some refactorings to make the intrinsics easier to read. The additional testing added there also fixed a number of integration issues when pulling the repository into this tree. * LTO with the compiler-builtins crate was fixed to link in the entire crate after the LTO process as these intrinsics are excluded from LTO. * Treatment of hidden symbols was updated as previously the `#![compiler_builtins]` crate would mark all symbol *imports* as hidden whereas it was only intended to mark *exports* as hidden.
2017-07-04Update a few comments.Mark Simulacrum-10/+5
2017-06-21Make rustc errors colorful.Mark Simulacrum-0/+9
Rustbuild passes --message-format=json to Cargo to learn about the dependencies for a given build, which then makes Cargo steal the stderr/stdout for the compiler process, leading to non colorful output. To avoid this, detection of stderr being a tty is added to rustbuild, and an environment variable is used to communicate with the rustc shim.
2017-06-19Bump version and stage0 compilerAlex Crichton-17/+2
2017-06-02rustbuild: Remove RUSTFLAGS logic in rustc shimAlex Crichton-6/+0
This was added in #38072 but I can't recall why and AFAIK Cargo already handles this. This was discovered through #42146 where passing duplicate flags was causing problems.
2017-05-30rustbuild: Fix copying duplicate crates into the sysrootAlex Crichton-0/+7
After compiling a project (e.g. libstd, libtest, or librustc) rustbuild needs to copy over all artifacts into the sysroot of the compiler it's assembling. Unfortunately rustbuild doesn't know precisely what files to copy! Today it has a heuristic where it just looks at the most recent version of all files that look like rlibs/dylibs and copies those over. This unfortunately leads to bugs with different versions of the same craet as seen in #42261. This commit updates rustbuild's strategy of copying artifacts to work off the list of artifacts produced by `cargo build --message-format=json`. The build system will now parse json messages coming out of Cargo to watch for files being generated, and then it'll only copy over those precise files. Note that there's still a bit of weird logic where Cargo prints that it's creating `libstd.rlib` where we actually want `libstd-xxxxx.rlib`, so we still do a bit of "most recent file" probing for those. This commit should take care of the crates.io dependency issues, however, as they're all copied over precisely. Closes #42261