about summary refs log tree commit diff
path: root/src/bootstrap/lib.rs
AgeCommit message (Collapse)AuthorLines
2018-07-03Compile stage0 tools with the raw bootstrap compilerAlex Crichton-6/+17
This commit updates the stage0 build of tools to use the libraries of the stage0 compiler instead of the compiled libraries by the stage0 compiler. This should enable us to avoid any stage0 hacks (like missing SIMD).
2018-07-01Provide llvm-strip in llvm-tools componentCrLF0710-1/+2
Shipping this tool gives people reliable way to reduce the generated executable size. I'm not sure if this strip tool is available from the llvm version current rust is built on. But let's take a look. @japaric
2018-07-01Did you mean to block nightlies on clippy?Oliver Schneider-0/+8
2018-06-24Haiku: there is no setpriority on this platform.Niels Sascha Reedijk-2/+2
2018-06-23build: add llvm-tools to manifestBrad Campbell-17/+4
This commit expands on a previous commit to build llvm-tools as a rustup component. It causes the llvm-tools component to be built if the extended step is active. It also adds llvm-tools to the build manifest so rustup can find it.
2018-06-21Auto merge of #50336 - japaric:llvm-tools, r=Mark-Simulacrumbors-0/+29
ship LLVM tools with the toolchain this PR adds llvm-{nm,objcopy,objdump,size} to the rustc sysroot (right next to LLD) this slightly increases the size of the rustc component. I measured these numbers on x86_64 Linux: - rustc-1.27.0-dev-x86_64-unknown-linux-gnu.tar.gz 180M -> 193M (+7%) - rustc-1.27.0-dev-x86_64-unknown-linux-gnu.tar.xz 129M -> 137M (+6%) r? @alexcrichton cc #49584
2018-06-08rustbuild: generate full list of dependencies for metadataest31-1/+2
Previously, we didn't send --features to our cargo metadata invocations, and thus missed some dependencies that we enable through the --features mechanism.
2018-06-04fix tidyJorge Aparicio-1/+1
2018-06-03use rustc version as llvm-tools versionJorge Aparicio-15/+18
2018-06-03make a llvm-tools rustup componentJorge Aparicio-0/+18
2018-06-03document what each tools doesJorge Aparicio-1/+5
2018-06-03also ship llvm-profdataJorge Aparicio-1/+3
2018-06-03ship LLVM tools with the toolchainJorge Aparicio-0/+2
2018-06-03impl is_tool on Mode enumCollins Abitekaniza-0/+9
make is_tool inherent prop of mode fix errors from rebase resolve issues from review
2018-06-03refactor, make requested changesCollins Abitekaniza-5/+4
2018-06-03refactor Mode enumCollins Abitekaniza-10/+17
2018-05-22Fix FileCheck findingJohn Kåre Alsaker-5/+13
2018-05-06s/DocTestsOption/DocTests/gkennytm-2/+2
2018-05-06Added test case.kennytm-1/+1
2018-05-06Added `./x.py test --no-doc` option.kennytm-1/+11
This enables `./x.py test --stage 0 src/libstd --no-doc` and ensures the stage2-rustc and rustdoc need to be built.
2018-04-07Auto merge of #49661 - alexcrichton:bump-bootstrap, r=nikomatsakisbors-3/+2
Bump the bootstrap compiler to 1.26.0 beta Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language features!
2018-04-05Bump the bootstrap compiler to 1.26.0 betaAlex Crichton-3/+2
Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language features!
2018-04-05Rollup merge of #49563 - japaric:std-thumb, r=alexcrichtonkennytm-0/+6
add a dist builder to build rust-std components for the THUMB targets the rust-std component only contains the core and compiler-builtins (+c +mem) crates cc #49382 - I'm not entirely sure if this PR alone will produce rust-std components installable by rustup or if something else needs to be changed - I could have done the THUMB builds in an existing builder / image; I wasn't sure if that was a good idea so I added a new image - I could build other crates like alloc into the rust-std component but, AFAICT, that would require calling Cargo a second time (one for alloc and one for compiler-builtins), or have alloc depend on compiler-builtins (#49503 will perform that change) *and* have alloc resurface the "c" and "mem" Cargo features. r? @alexcrichton
2018-04-03Stop checking that the graph produced by a dry run is equivalentMark Simulacrum-12/+4
This is too likely to cause spurious bounces on CI; what we run may be dependent on what ran successfully before hand (e.g. RLS features with Clippy), which makes this not tenable. There's no good way to ignore specifically these problematic steps so we'll just ignore everything for the time being. We still test that a dry run worked though so largely this is the same from a ensure-that-tests-work perspective. Eventually we'll want to undo this commit, though, to make our tests more accurate.
2018-04-03Fix a few accidental expectationsMark Simulacrum-0/+5
2018-04-03Avoid printing output when in dry run modeMark Simulacrum-1/+6
2018-04-03Refactor to use a dry-run config instead of cfg(test)Mark Simulacrum-8/+193
This ensures that each build will support the testing design of "dry running" builds. It's also checked that a dry run build is equivalent step-wise to a "wet" run build; the graphs we generate when running are directly compared node/node and edge/edge, both for order and contents.
2018-04-03Implement generating graphs of the build stepsMark Simulacrum-4/+5
2018-04-03Stub out less codeMark Simulacrum-15/+13
2018-04-03Add tests to rustbuildMark Simulacrum-0/+4
In order to run tests, previous commits have cfg'd out various parts of rustbuild. Generally speaking, these are filesystem-related operations and process-spawning related parts. Then, rustbuild is run "as normal" and the various steps that where run are retrieved from the cache and checked against the expected results. Note that this means that the current implementation primarily tests "what" we build, but doesn't actually test that what we build *will* build. In other words, it doesn't do any form of dependency verification for any crate. This is possible to implement, but is considered future work. This implementation strives to cfg out as little code as possible; it also does not currently test anywhere near all of rustbuild. The current tests are also not checked for "correctness," rather, they simply represent what we do as of this commit, which may be wrong. Test cases are drawn from the old implementation of rustbuild, though the expected results may vary.
2018-04-03Make test steps sortableMark Simulacrum-1/+1
Ensures that test cases will be somewhat easier to write.
2018-04-03Stub out various functions during testingMark Simulacrum-10/+19
2018-04-03Permit constructing Build without executingMark Simulacrum-19/+21
2018-04-03Permit constructing Builder without executingMark Simulacrum-1/+7
2018-04-03Stop accessing current_dir in bootstrapMark Simulacrum-2/+1
This ensures that the working directory of rustbuild has no effect on it's run; since tests will run with a different cwd this is required for consistent behavior.
2018-04-01add a dist-thumb builder to build rust-std for the THUMB targetsJorge Aparicio-0/+6
the rust-std component only contains the core and compiler-builtins (+c +mem) crates cc #49382
2018-03-26rustbuild: Fail the build if we build Cargo twiceAlex Crichton-0/+5
This commit updates the `ToolBuild` step to stream Cargo's JSON messages, parse them, and record all libraries built. If we build anything twice (aka Cargo) it'll most likely happen due to dependencies being recompiled which is caught by this check.
2018-03-21Add support to rustbuild for a 'rustc docs' component tarballDavid Wood-0/+5
2018-03-17Rollup merge of #48943 - comex:verbose, r=kennytmkennytm-4/+0
Support extra-verbose builds - The bootstrap crate currently passes -v to Cargo if itself invoked with -vv. But Cargo supports -vv (to show build script output), so make bootstrap pass that if itself invoked with -vvv. (More specifically, pass N '-v's to Cargo if invoked with N+1 of them.) - bootstrap.py currently tries to pass on up to two '-v's to cargo when building bootstrap, but incorrectly ('-v' is marked as 'store_true', so argparse stores either False or True, ignoring multiple '-v's). Fix this, allow passing any number of '-v's, and make it consistent with bootstrap's invocation of Cargo (i.e. subtract one from the number of '-v's). - Also improve bootstrap.py's config.toml 'parsing' to support arbitrary verbosity levels, + allow command line to override it.
2018-03-16Automatically enable the `clippy` feature of `rls` if clippy buildsOliver Schneider-0/+1
2018-03-15Support extra-verbose builds:comex-4/+0
- The bootstrap crate currently passes -v to Cargo if itself invoked with -vv. But Cargo supports -vv (to show build script output), so make bootstrap pass that if itself invoked with -vvv. (More specifically, pass N '-v's to Cargo if invoked with N+1 of them.) - bootstrap.py currently tries to pass on up to two '-v's to cargo when building bootstrap, but incorrectly ('-v' is marked as 'store_true', so argparse stores either False or True, ignoring multiple '-v's). Fix this, allow passing any number of '-v's, and make it consistent with bootstrap's invocation of Cargo (i.e. subtract one from the number of '-v's). - Also improve bootstrap.py's config.toml 'parsing' to support arbitrary verbosity levels, + allow command line to override it.
2018-03-11Auto merge of #48599 - Mark-Simulacrum:rustbuild-updates-step-1, r=alexcrichtonbors-1/+1
Remove ONLY_BUILD and ONLY_BUILD_TARGETS Primarily removes `ONLY_BUILD` and `ONLY_BUILD_TARGETS`. These aren't actually needed in the new system since we can simply not take the relevant `host` and `target` fields if we don't want to run with them in `Step::make_run`. This PR also includes a few other commits which generally clean up the state of rustbuild, but are not related to the `Step` changes.
2018-03-09rustbuild: Fix MSBuild location of `llvm-config.exe`Alex Crichton-14/+0
For LLD integration the path to `llvm-config` needed to change to inside the build directory itself (for whatever reason) but the build directory is different on MSBuild than it is on `ninja` for MSVC builds, so the path to `llvm-config.exe` was actually wrong and not working! This commit removes the `Build::llvm_config` function in favor of the source of truth, the `Llvm` build step itself. The build step was then updated to find the right build directory for MSBuild as well as `ninja` for where `llvm-config.exe` is located. Closes #48749
2018-03-08Deny warningsMark Simulacrum-1/+1
2018-03-03rust: Import LLD for linking wasm objectsAlex Crichton-1/+7
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-17Add command to launch only doc testsGuillaume Gomez-0/+2
2018-02-11Change Step to be invoked with a path when in default mode.Mark Simulacrum-15/+22
Previously, a Step would be able to tell on its own when it was invoked "by-default" (that is, `./x.py test` was called instead of `./x.py test some/path`). This commit replaces that functionality, invoking each Step with each of the paths it has specified as "should be invoked by." For example, if a step calls `path("src/tools/cargo")` and `path("src/doc/cargo")` then it's make_run will be called twice, with "src/tools/cargo" and "src/doc/cargo." This makes it so that default handling logic is in builder, instead of spread across various Steps. However, this meant that some Step specifications needed to be updated, since for example `rustdoc` can be built by `./x.py build src/librustdoc` or `./x.py build src/tools/rustdoc`. A `PathSet` abstraction is added that handles this: now, each Step can not only list `path(...)` but also `paths(&[a, b, ...])` which will make it so that we don't invoke it with each of the individual paths, instead invoking it with the first path in the list (though this shouldn't be depended on). Future work likely consists of implementing a better/easier way for a given Step to work with "any" crate in-tree, especially those that want to run tests, build, or check crates in the std, test, or rustc crate trees. Currently this is rather painful to do as most of the logic is duplicated across should_run and make_run. It seems likely this can be abstracted away into builder somehow.
2018-02-10fix typos in src/{bootstrap,ci,etc,lib{backtrace,core,fmt_macros}}Matthias Krüger-1/+1
2018-02-05Use time crate in bootstrap dist instead of dateOnur Aslan-0/+1
2018-01-30Add wasm_syscall feature to build systemDiggory Blake-0/+3