about summary refs log tree commit diff
path: root/src/bootstrap/config.rs
AgeCommit message (Collapse)AuthorLines
2019-10-25Rollup merge of #65408 - guanqun:remove-rust-optimize, r=Mark-SimulacrumMazdak Farrokhzad-15/+15
reorder config.toml.example options and add one missing option r? @Mark-Simulacrum
2019-10-24reorder TomlTarget struct's fields based on the order in config.toml.exampleGuanqun Lu-2/+2
2019-10-24reorder Rust struct's fields based on the order in config.toml.exampleGuanqun Lu-5/+5
2019-10-24reorder Install struct's fields based on the order in config.toml.exampleGuanqun Lu-1/+1
2019-10-24reorder Build struct's fields based on the order in config.toml.exampleGuanqun Lu-4/+4
2019-10-24reorder Llvm struct's fields based on the order in config.toml.exampleGuanqun Lu-3/+3
2019-10-21Remove `src/llvm-emscripten` submoduleAlex Crichton-1/+0
With #65251 landed there's no need to build two LLVM backends and ship them with rustc, every target we have now uses the same LLVM backend! This removes the `src/llvm-emscripten` submodule and additionally removes all support from rustbuild for building the emscripten LLVM backend. Multiple codegen backend support is left in place for now, and this is intended to be an easy 10-15 minute win on CI times by avoiding having to build LLVM twice.
2019-09-10Locate rustc binary similarly to codegen backend loadingMark Rousskov-2/+3
This ensures that the failure cases for finding the codegen backend and for finding the rustc binary are essentially the same, and since we almost always will load the codegen backend, this is essentially meaning that the rustc change is not a regression.
2019-08-28std: Remove the `wasm_syscall` featureAlex Crichton-3/+0
This commit removes the `wasm_syscall` feature from the wasm32-unknown-unknown build of the standard library. This feature was originally intended to allow an opt-in way to interact with the operating system in a posix-like way but it was never stabilized. Nowadays with the advent of the `wasm32-wasi` target that should entirely replace the intentions of the `wasm_syscall` feature.
2019-08-08remove test-miri flag from bootstrapRalf Jung-4/+0
2019-08-02rustbuild: RISC-V is no longer an experimental LLVM targetSam Elliott-3/+2
This commit moves RISC-V from the experimental LLVM targets to the regular LLVM targets. RISC-V was made non-experimental in https://reviews.llvm.org/rL366399 I have also sorted the list of LLVM targets, and changed the code around setting llvm_exp_targets (and its default) to match the code setting llvm_targets (and its default), ensuring future changes to the defaults, as LLVM targets become stable, affect as few places as possible.
2019-07-05Lint on invalid values passed to x.py --warningsMark Rousskov-2/+2
This also introduces support for `--warnings allow` and fixes --warnings being overridden by the configuration file, config.toml.
2019-06-07Clarify when we run steps with ONLY_HOSTSMark Rousskov-2/+4
2019-06-03Treat 0 as special value for codegen-units-stdMark Rousskov-9/+10
Fixes #57669
2019-05-24rustbuild: Untie `debuginfo-level-tests` from `debuginfo-level`Vadim Petrochenkov-1/+1
2019-05-24rustbuild: Simplify debuginfo configurationVadim Petrochenkov-28/+29
2019-05-09remove unneeded `extern crate`s from build toolsAndy Russell-0/+2
2019-04-03Support using LLVM's libunwind as the unwinder implementationPetr Hosek-0/+3
This avoids the dependency on host libraries such as libgcc_s which may be undesirable in some deployment environments where these aren't available.
2019-03-29Add a new wasm32-unknown-wasi targetAlex Crichton-0/+3
This commit adds a new wasm32-based target distributed through rustup, supported in the standard library, and implemented in the compiler. The `wasm32-unknown-wasi` target is intended to be a WebAssembly target which matches the [WASI proposal recently announced.][LINK]. In summary the WASI target is an effort to define a standard set of syscalls for WebAssembly modules, allowing WebAssembly modules to not only be portable across architectures but also be portable across environments implementing this standard set of system calls. The wasi target in libstd is still somewhat bare bones. This PR does not fill out the filesystem, networking, threads, etc. Instead it only provides the most basic of integration with the wasi syscalls, enabling features like: * `Instant::now` and `SystemTime::now` work * `env::args` is hooked up * `env::vars` will look up environment variables * `println!` will print to standard out * `process::{exit, abort}` should be hooked up appropriately None of these APIs can work natively on the `wasm32-unknown-unknown` target, but with the assumption of the WASI set of syscalls we're able to provide implementations of these syscalls that engines can implement. Currently the primary engine implementing wasi is [wasmtime], but more will surely emerge! In terms of future development of libstd, I think this is something we'll probably want to discuss. The purpose of the WASI target is to provide a standardized set of syscalls, but it's *also* to provide a standard C sysroot for compiling C/C++ programs. This means it's intended that functions like `read` and `write` are implemented for this target with a relatively standard definition and implementation. It's unclear, therefore, how we want to expose file descriptors and how we'll want to implement system primitives. For example should `std::fs::File` have a libc-based file descriptor underneath it? The raw wasi file descriptor? We'll see! Currently these details are all intentionally hidden and things we can change over time. A `WasiFd` sample struct was added to the standard library as part of this commit, but it's not currently used. It shows how all the wasi syscalls could be ergonomically bound in Rust, and they offer a possible implementation of primitives like `std::fs::File` if we bind wasi file descriptors exactly. Apart from the standard library, there's also the matter of how this target is integrated with respect to its C standard library. The reference sysroot, for example, provides managment of standard unix file descriptors and also standard APIs like `open` (as opposed to the relative `openat` inspiration for the wasi ssycalls). Currently the standard library relies on the C sysroot symbols for operations such as environment management, process exit, and `read`/`write` of stdio fds. We want these operations in Rust to be interoperable with C if they're used in the same process. Put another way, if Rust and C are linked into the same WebAssembly binary they should work together, but that requires that the same C standard library is used. We also, however, want the `wasm32-unknown-wasi` target to be usable-by-default with the Rust compiler without requiring a separate toolchain to get downloaded and configured. With that in mind, there's two modes of operation for the `wasm32-unknown-wasi` target: 1. By default the C standard library is statically provided inside of `liblibc.rlib` distributed as part of the sysroot. This means that you can `rustc foo.wasm --target wasm32-unknown-unknown` and you're good to go, a fully workable wasi binary pops out. This is incompatible with linking in C code, however, which may be compiled against a different sysroot than the Rust code was previously compiled against. In this mode the default of `rust-lld` is used to link binaries. 2. For linking with C code, the `-C target-feature=-crt-static` flag needs to be passed. This takes inspiration from the musl target for this flag, but the idea is that you're no longer using the provided static C runtime, but rather one will be provided externally. This flag is intended to also get coupled with an external `clang` compiler configured with its own sysroot. Therefore you'll typically use this flag with `-C linker=/path/to/clang-script-wrapper`. Using this mode the Rust code will continue to reference standard C symbols, but the definition will be pulled in by the linker configured. Alright so that's all the current state of this PR. I suspect we'll definitely want to discuss this before landing of course! This PR is coupled with libc changes as well which I'll be posting shortly. [LINK]: [wasmtime]:
2019-03-16[bootstrap] Remove llvm.enabled configbjorn3-4/+5
2019-02-27Whitelist containers that allow older toolchainsAlex Crichton-0/+3
We'll use this as a temporary measure to get an LLVM update landed, but we'll have to go through and update images later to make sure they've got the right toolchains.
2019-01-31Auto merge of #57514 - michaelwoerister:xlto-tests, r=alexcrichtonbors-0/+3
compiletest: Support opt-in Clang-based run-make tests and use them for testing xLTO. Some cross-language run-make tests need a Clang compiler that matches the LLVM version of `rustc`. Since such a compiler usually isn't available these tests (marked with the `needs-matching-clang` directive) are ignored by default. For some CI jobs we do need these tests to run unconditionally though. In order to support this a `--force-clang-based-tests` flag is added to compiletest. If this flag is specified, `compiletest` will fail if it can't detect an appropriate version of Clang. @rust-lang/infra The PR doesn't yet enable the tests yet. Do you have any recommendation for which jobs to enable them? cc #57438 r? @alexcrichton
2019-01-30bootstrap: Expose LLVM_USE_LINKER cmake option to config.toml.Michael Woerister-0/+3
2019-01-28Use multiple threads by default. Limits tests to one thread. Do some renaming.John Kåre Alsaker-3/+3
2019-01-13Support passing cflags/cxxflags/ldflags to LLVM buildPetr Hosek-0/+10
This may be needed with some host compilers.
2019-01-05Provide the option to use libc++ even on all platformsPetr Hosek-0/+4
This is the default on platforms which use libc++ as the default C++ library but this option allows using libc++ on others as well.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-10bootstrap: fix editionljedrz-3/+3
2018-12-07use top level `fs` functions where appropriateAndy Russell-5/+2
This commit replaces many usages of `File::open` and reading or writing with `fs::read_to_string`, `fs::read` and `fs::write`. This reduces code complexity, and will improve performance for most reads, since the functions allocate the buffer to be the size of the file. I believe that this commit will not impact behavior in any way, so some matches will check the error kind in case the file was not valid UTF-8. Some of these cases may not actually care about the error.
2018-11-30ci: Only run compare-mode tests on one builderAlex Crichton-0/+3
The run-pass test suite currently takes 30 minutes on Windows, and that appears to be roughly split between two 15 minute runs of the test suite: one without NLL and one with NLL. In discussion on Discord the platform coverage of the NLL compare mode may not necessarily be worth it, so this commit removes the NLL compare mode from tests by default, and then reenables it on only one builder.
2018-11-02Use `jemalloc-sys` on Linux and OSX compilersAlex Crichton-1/+4
This commit adds opt-in support to the compiler to link to `jemalloc` in the compiler. When activated the compiler will depend on `jemalloc-sys`, instruct jemalloc to unprefix its symbols, and then link to it. The feature is activated by default on Linux/OSX compilers for x86_64/i686 platforms, and it's not enabled anywhere else for now. We may be able to opt-in other platforms in the future! Also note that the opt-in only happens on CI, it's otherwise unconditionally turned off by default. Closes #36963
2018-11-02Remove all jemalloc-related contentAlex Crichton-14/+0
This commit removes all jemalloc related submodules, configuration, etc, from the bootstrap, from the standard library, and from the compiler. This will be followed up with a change to use jemalloc specifically as part of rustc on blessed platforms.
2018-10-26bootstrap: Allow for build libstd to have its own codegen-unit setting.Michael Woerister-0/+4
2018-10-20Update Cargo, build curl/OpenSSL statically via featuresAlex Crichton-3/+3
In addition to to updating Cargo's submodule and Cargo's dependencies, this also updates Cargo's build to build OpenSSL statically into Cargo as well as libcurl unconditionally. This removes OpenSSL build logic from the bootstrap code, and otherwise requests that even on OSX we build curl statically.
2018-10-19Prefer unwrap_or_else to unwrap_or in case of function calls/allocationsljedrz-2/+2
2018-10-12Rollup merge of #54811 - ↵kennytm-1/+3
pnkfelix:issue-24840-separate-bootstrap-default-for-optimize-from-debug-setting, r=nikomatsakis During rustc bootstrap, make default for `optimize` independent of `debug` It may have taken me three and a half years, but I'm following through on my ["threat"](https://github.com/rust-lang/rust/issues/24840#issuecomment-97911700) Fix #24840
2018-10-04Fix #24840: make default for `optimize` independent of `debug` setting in ↵Felix S. Klock II-1/+3
`Cargo.toml`.
2018-10-01Fix conditions to allow missing tools in CIChristian Poveda-0/+2
2018-09-28Add enable-missing-tools optionChristian Poveda-0/+2
2018-09-25Improvements to finding LLVM's FileCheckTom Tromey-0/+6
This patch adds a few improvements to how the build system finds LLVM's FileCheck program. * On Fedora, the system LLVM installs FileCheck in the "llvm" subdirectory of the LLVM libdir. This patch teaches the build system to look there. * This adds a configure option to specify which llvm-config executable to use. This is handy on systems that can parallel install multiple versions of LLVM; for example I can now: ./configure --llvm-config=/bin/llvm-config-5.0-64 ... to build against LLVM 5, rather than whatever the default llvm-config might be. * Finally, this adds a configure- and config.toml- option to set the path to FileCheck. This is handy when building against an LLVM where FileCheck was not installed. This happens on compatibility installs of LLVM on Fedora.
2018-09-14Rollup merge of #53829 - alexcrichton:release-debuginfo, r=michaelwoeristerkennytm-0/+3
Add rustc SHA to released DWARF debuginfo 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-09-10Add rustc SHA to released DWARF debuginfoAlex Crichton-0/+3
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-09-07rustbuild: allow configuring llvm version suffixMarc-Antoine Perennou-0/+3
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2018-08-20bootstrap: Allow for building LLVM with ThinLTO.Michael Woerister-0/+3
2018-08-20bootstrap: Allow to specify ranlib tool used when compiling C++ code.Michael Woerister-0/+3
2018-08-14Add lldb to the buildTom Tromey-0/+3
This optionally adds lldb (and clang, which it needs) to the build. Because rust uses LLVM 7, and because clang 7 is not yet released, a recent git master version of clang is used. The lldb that is used includes the Rust plugin. lldb is only built when asked for, or when doing a nightly build on macOS. Only macOS is done for now due to difficulties with the Python dependency.
2018-08-01[RISCV] Enable CI.David Craven-1/+1
2018-07-14Change keep-stage to only affect the passed stageMark Rousskov-1/+1
The best way to build a stage 2 rustc is now probably ./x.py build --stage 2 src/rustc # once ./x.py build --stage 2 --keep-stage 1 src/rustc
2018-07-11Auto merge of #51230 - nikic:no-verify-lto, r=pnkfelixbors-0/+3
Disable LLVM verification by default Currently -Z no-verify only controls IR verification prior to LLVM codegen, while verification is performed unconditionally both before and after linking with (Thin)LTO. Also wondering what the sentiment is on disabling verification by default (and e.g. only enabling it on ALT builds with assertions). This does not seem terribly useful outside of rustc development and it does seem to show up in profiles (at something like 3%). **EDIT:** A table showing the various configurations and what is enabled when. | Configuration | Dynamic verification performed | LLVM static assertions compiled in | | --- | --- | --- | | alt builds | | yes | | nightly builds | | no | | stable builds | | no | | CI builds | | | | dev builds in a checkout | | |
2018-07-02bootstrap: tests should use rustc from config.tomlNikolai Merinov-4/+2
Tests should always use "rustc" and "cargo" from config.toml instead of assuming that stage0 binaries was downloaded to build directory.