about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2018-08-31Update LLVM submoduleAlex Crichton-0/+1
This commit updates the LLVM submodule to the current trunk of LLVM itself. This brings a few notable improvements for the wasm target: * Support for wasm atomic instructions is greatly improved * Renamed memory wasm intrinsics are fully supported * LLD has fixed a quadratic execution bug with large numbers of relocations in wasm files. The compiler-rt submodule has been updated in tandem as well.
2018-08-31use cfg(rustdoc) instead of cfg(dox) in std and friendsQuietMisdreavus-0/+2
2018-08-31Auto merge of #53832 - pietroalbini:rollup, r=pietroalbinibors-3/+5
Rollup of 20 pull requests Successful merges: - #51760 (Add another PartialEq example) - #53113 (Add example for Cow) - #53129 (remove `let x = baz` which was obscuring the real error) - #53389 (document effect of join on memory ordering) - #53472 (Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.) - #53476 (Add partialeq implementation for TryFromIntError type) - #53513 (Force-inline `shallow_resolve` at its hottest call site.) - #53655 (set applicability) - #53702 (Fix stabilisation version for macro_vis_matcher.) - #53727 (Do not suggest dereferencing in macro) - #53732 (save-analysis: Differentiate foreign functions and statics.) - #53740 (add llvm-readobj to llvm-tools-preview) - #53743 (fix a typo: taget_env -> target_env) - #53747 (Rustdoc fixes) - #53753 (expand keep-stage --help text) - #53756 (Fix typo in comment) - #53768 (move file-extension based .gitignore down to src/) - #53785 (Fix a comment in src/libcore/slice/mod.rs) - #53786 (Replace usages of 'bad_style' with 'nonstandard_style'.) - #53806 (Fix UI issues on Implementations on Foreign types) Failed merges: r? @ghost
2018-08-30Rollup merge of #53786 - frewsxcv:frewsxcv-bad-style, r=ManishearthPietro Albini-2/+2
Replace usages of 'bad_style' with 'nonstandard_style'. `bad_style` is being deprecated in favor of `nonstandard_style`: - https://github.com/rust-lang/rust/issues/41646
2018-08-30Rollup merge of #53753 - RalfJung:keep-stage, r=nikomatsakisPietro Albini-1/+2
expand keep-stage --help text
2018-08-30Rollup merge of #53740 - japaric:readobj, r=alexcrichtonPietro Albini-0/+1
add llvm-readobj to llvm-tools-preview Similar to readelf but supports more object formats (it seems). Particularly useful to inspect in detail sections (e.g. their flags) and symbols (e.g. their types). r? @alexcrichton cc @dvc94ch
2018-08-30rustbuild: Distribute libLLVM.so with rustcAlex Crichton-5/+7
A recent change (#53245) started to build LLVM with ThinLTO enabled and to ensure that compile times are kept down it builds LLVM dynamically by default to ensure that all the various LLVM tools aren't redoing all that optimization work. This means, however, that all LLVM tools depend on LLVM's dynamic library by default. While the LLVM tools and LLDB components were updated to include the shared library we accidentally forgot about LLD, included with the main rustc component. LLD also links dynamically to LLVM and ships a non-working binary right now because of this! This commit updates our distribution to ship the LLVM dynamic library with the compiler libraries. While not technically needed for rustc itself to operate (right now) it may be needed for LLD, and otherwise it serves as a good basis for the other LLVM tools components to work with as well. This should... Closes #53813
2018-08-29Replace usages of 'bad_style' with 'nonstandard_style'.Corey Farwell-2/+2
`bad_style` is being deprecated in favor of `nonstandard_style`: - https://github.com/rust-lang/rust/issues/41646
2018-08-29Auto merge of #53245 - michaelwoerister:thinlto-rust-llvm, r=alexcrichtonbors-22/+124
[experimental]: Build LLVM with ThinLTO enabled (2nd attempt) This is https://github.com/rust-lang/rust/pull/51207 revived. This time, I'd like to run actual performance tests to see if it improves compile times.
2018-08-29bootstrap: Link LLVM tools dynamically in order to save time in ThinLTO builds.Michael Woerister-16/+46
2018-08-28sortJorge Aparicio-1/+1
2018-08-28expand keep-stage --help textRalf Jung-1/+2
2018-08-27add llvm-readobj to llvm-tools-previewJorge Aparicio-0/+1
2018-08-24Added rustc_codegen_llvm to compiler documentation.David Wood-1/+1
2018-08-20bootstrap: Never compiler llvm-emscripten with ThinLTO.Michael Woerister-1/+1
2018-08-20bootstrap: Allow for building LLVM with ThinLTO.Michael Woerister-4/+58
2018-08-20bootstrap: Allow to invoke cargo with the Usage: rustc [OPTIONS] INPUTMichael Woerister-2/+2
Options: -h, --help Display this message --cfg SPEC Configure the compilation environment -L [KIND=]PATH Add a directory to the library search path. The optional KIND can be one of dependency, crate, native, framework or all (the default). -l [KIND=]NAME Link the generated crate(s) to the specified native library NAME. The optional KIND can be one of static, dylib, or framework. If omitted, dylib is assumed. --crate-type [bin|lib|rlib|dylib|cdylib|staticlib|proc-macro] Comma separated list of types of crates for the compiler to emit --crate-name NAME Specify the name of the crate being built --emit [asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir] Comma separated list of types of output for the compiler to emit --print [crate-name|file-names|sysroot|cfg|target-list|target-cpus|target-features|relocation-models|code-models|tls-models|target-spec-json|native-static-libs] Comma separated list of compiler information to print on stdout -g Equivalent to -C debuginfo=2 -O Equivalent to -C opt-level=2 -o FILENAME Write output to <filename> --out-dir DIR Write output to compiler-chosen filename in <dir> --explain OPT Provide a detailed explanation of an error message --test Build a test harness --target TARGET Target triple for which the code is compiled -W, --warn OPT Set lint warnings -A, --allow OPT Set lint allowed -D, --deny OPT Set lint denied -F, --forbid OPT Set lint forbidden --cap-lints LEVEL Set the most restrictive lint level. More restrictive lints are capped at this level -C, --codegen OPT[=VALUE] Set a codegen option -V, --version Print version info and exit -v, --verbose Use verbose output Additional help: -C help Print codegen options -W help Print 'lint' options and default settings --help -v Print the full set of options rustc accepts command.
2018-08-20bootstrap: Allow to specify ranlib tool used when compiling C++ code.Michael Woerister-0/+18
2018-08-18Use the new Entry::or_default method where possible.Eduard-Mihai Burtescu-3/+3
2018-08-17Auto merge of #53190 - sekineh:thumb-cortex-m, r=jamesmunnsbors-1/+11
Add crate build test for `thumb*` targets. [IRR-2018-embedded] ## Summary This PR adds `run-make` test that compiles `cortex-m` crate for all supported `thumb*-none-*` targets using `cargo` and stage2 `rustc`. - Supported `thumb*-none-*` targets: - thumbv6m-none-eabi (Bare Cortex-M0, M0+, M1) - thumbv7em-none-eabi (Bare Cortex-M4, M7) - thumbv7em-none-eabihf (Bare Cortex-M4F, M7F, FPU, hardfloat) - thumbv7m-none-eabi (Bare Cortex-M3) ## How to run & Example output I tested locally and all targets succeeded like below: ``` ./x.py clean ./x.py test --target thumbv6m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf,thumbv7m-none-eabi src/test/run-make ``` ``` Check compiletest suite=run-make mode=run-make (x86_64-unknown-linux-gnu -> thumbv6m-none-eabi) running 5 tests ..... test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ``` ## How to re-run Remove `stamp` file for the test run. ``` rm build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-cortex-m/stamp ``` Then run `test` ``` ./x.py test --target thumbv6m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf,thumbv7m-none-eabi src/test/run-make (snip) running 5 tests iiii. test result: ok. 1 passed; 0 failed; 4 ignored; 0 measured; 0 filtered out ``` ## Artifacts You can examine the artifacts under the directory below: ``` sekineh@sekineh-VirtualBox:~/rustme10$ ls -l build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-cortex-m/thumb-none-cortex-m/ total 4 drwxrwxr-x 7 sekineh sekineh 4096 8月 14 22:40 cortex-m ``` where `build/x86_64-unknown-linux-gnu/test/run-make/thumb-none-cortex-m/thumb-none-cortex-m/` is came from TMPDIR variable. ## Other notes For `test.rs` modification, I used the same logic as: - https://github.com/rust-lang/rust/blame/d8b3c830fbcdd14d085209a8dcc3399151f3286a/src/bootstrap/dist.rs#L652-L657 ``` if builder.no_std(target) == Some(true) { // the `test` doesn't compile for no-std targets builder.ensure(compile::Std { compiler, target }); } else { builder.ensure(compile::Test { compiler, target }); } ``` It is a useful snippet when adding `no_std` support to `src/bootstrap` code. CC @kennytm @jamesmunns @nerdyvaishali
2018-08-14Add lldb to the buildTom Tromey-17/+179
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-12Rollup merge of #53165 - ↵Guillaume Gomez-0/+1
jakllsch:netbsd-ad22a005-b917-47f3-8156-f717d36f6bbe, r=estebank Add aarch64-unknown-netbsd target Depends on #53116.
2018-08-10aarch64-unknown-netbsd: add openssl configurationJonathan A. Kollasch-0/+1
2018-08-08[CI] run-make/thumb: remove a trailing space.Hideki Sekine-1/+1
2018-08-08[CI] run-make/thumb: remove hacky workaround.Hideki Sekine-1/+11
2018-08-06Building librustc_codegen_llvm in a separate directoryMark Rousskov-7/+10
This allows clearing it out and building it separately from the compiler. Since it's essentially a different and separate crate this makes sense to do, each cargo invocation should generally happen in its own directory.
2018-08-04Rollup merge of #52969 - Keruspe:local_rebuild, r=alexcrichtonkennytm-1/+1
rustbuild: fix local_rebuild If we detect a local rebuild (e.g. bootstrap compiler is the same version as target compiler), we set stage to 1. When trying to build e.g. UnstableBook, we use Mode::ToolBootstrap and stage is 1. Just allow Mode::ToolBootstrap and stagge != 0 if we are in a local_rebuild This fixes building current master using current beta (as master hasn't yet been bumped to 1.30). This should be backported to beta too, as currently we cannot build beta using itself because of that. r? @alexcrichton
2018-08-02Update Cargo submoduleAlex Crichton-0/+6
Bring in some fixes for `cargo fix` notably
2018-08-02Auto merge of #52949 - Mark-Simulacrum:snap, r=alexcrichtonbors-1/+1
Switch to bootstrapping from 1.29 beta r? @alexcrichton
2018-08-02rustbuild: fix local_rebuildMarc-Antoine Perennou-1/+1
If we detect a local rebuild (e.g. bootstrap compiler is the same version as target compiler), we set stage to 1. When trying to build e.g. UnstableBook, we use Mode::ToolBootstrap and stage is 1. Just allow Mode::ToolBootstrap and stagge != 0 if we are in a local_rebuild Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2018-08-01Switch to bootstrapping from 1.29 betaMark Rousskov-1/+1
2018-08-01[RISCV] Enable CI.David Craven-1/+1
2018-08-01Rollup merge of #52853 - RalfJung:bootstrap-help, r=alexcrichtonPietro Albini-3/+10
Improve bootstrap help on stages Cc @eddyb
2018-08-01Rollup merge of #52846 - kennytm:bootstrap-curl-timeout, r=Mark-SimulacrumPietro Albini-1/+4
Add timeout to use of `curl` in bootstrap.py. Recently we've seen a lot of "30 minutes no output" spurious errors while downloading the bootstrap compiler. This added several timeout options so if the "30 minutes no output" errors were caused by connection or transfer issue, we could fail quicker for curl to retry.
2018-07-30Remove the unstable std_unicode crate, deprecated since 1.27Simon Sapin-3/+1
Its former contents are now in libcore.
2018-07-30improve test stage documentationRalf Jung-2/+6
2018-07-30improve --stage documentationRalf Jung-1/+4
2018-07-30Auto merge of #52805 - ljedrz:format_str_literal, r=petrochenkovbors-11/+11
Don't format!() string literals Prefer `to_string()` to `format!()` take 2, this time targetting string literals. In some cases (`&format!("...")` -> `"..."`) also removes allocations. Occurences of `format!("")` are changed to `String::new()`.
2018-07-30Add timeout to use of `curl` in bootstrap.py.kennytm-1/+4
2018-07-30Auto merge of #52828 - Mark-Simulacrum:clear-rustdoc-check, r=alexcrichtonbors-0/+5
Clear out rustdoc check builds if dependencies change r? @alexcrichton
2018-07-29Auto merge of #52738 - ljedrz:push_to_extend, r=eddybbors-4/+1
Replace push loops with extend() where possible Or set the vector capacity where I couldn't do it. According to my [simple benchmark](https://gist.github.com/ljedrz/568e97621b749849684c1da71c27dceb) `extend`ing a vector can be over **10 times** faster than `push`ing to it in a loop: 10 elements (6.1 times faster): ``` test bench_extension ... bench: 75 ns/iter (+/- 23) test bench_push_loop ... bench: 458 ns/iter (+/- 142) ``` 100 elements (11.12 times faster): ``` test bench_extension ... bench: 87 ns/iter (+/- 26) test bench_push_loop ... bench: 968 ns/iter (+/- 3,528) ``` 1000 elements (11.04 times faster): ``` test bench_extension ... bench: 311 ns/iter (+/- 9) test bench_push_loop ... bench: 3,436 ns/iter (+/- 233) ``` Seems like a good idea to use `extend` as much as possible.
2018-07-29Replace push loops with collect() and extend() where possibleljedrz-4/+1
2018-07-29Clear out rustdoc check builds if dependencies changeMark Rousskov-0/+5
2018-07-29Auto merge of #52755 - kennytm:update-rustfmt, r=nrcbors-0/+7
Update rustfmt and RLS
2018-07-29Auto merge of #52767 - ljedrz:avoid_format, r=petrochenkovbors-1/+1
Prefer to_string() to format!() Simple benchmarks suggest in some cases it can be faster by even 37%: ``` test converting_f64_long ... bench: 339 ns/iter (+/- 199) test converting_f64_short ... bench: 136 ns/iter (+/- 34) test converting_i32_long ... bench: 87 ns/iter (+/- 16) test converting_i32_short ... bench: 87 ns/iter (+/- 49) test converting_str ... bench: 54 ns/iter (+/- 15) test formatting_f64_long ... bench: 349 ns/iter (+/- 176) test formatting_f64_short ... bench: 145 ns/iter (+/- 14) test formatting_i32_long ... bench: 98 ns/iter (+/- 14) test formatting_i32_short ... bench: 93 ns/iter (+/- 15) test formatting_str ... bench: 86 ns/iter (+/- 23) ```
2018-07-29Copy the test_data/ RLS tests into a writable directory.kennytm-0/+7
See rust-lang-nursery/rls#966 for details.
2018-07-28Don't format!() string literalsljedrz-11/+11
2018-07-27Prefer to_string() to format!()ljedrz-1/+1
2018-07-26Refactor is_external_tool into source_typeTatsuyuki Ishi-22/+32
2018-07-25bootstrap: use prepare_tool_cargo everywhereTatsuyuki Ishi-24/+22
In this way, RUSTC_NO_PREFER_DYNAMIC is already specified and not needed.