about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2019-04-27Rollup merge of #60315 - pietroalbini:fix-tools-version, r=Mark-SimulacrumMazdak Farrokhzad-2/+2
bootstrap: use correct version numbers for llvm-tools and lldb The current URLs for the `llvm-tools` and `lldb` components are a bit broken right now: ``` https://static.rust-lang.org/dist/2019-04-25/llvm-tools-1.34.1 (fc50f328b 2019-04-24)-aarch64-unknown-linux-gnu.tar.gz ``` This PR uses proper version numbers for those. Tested a dist build locally and everything works. r? @Mark-Simulacrum
2019-04-26bootstrap: use correct version numbers for llvm-tools and lldbPietro Albini-2/+2
2019-04-26include rustc-std-workspace-alloc in rust-srcRalf Jung-0/+1
2019-04-25Rollup merge of #60038 - michaelwoerister:pgo-updates-2, r=alexcrichtonMazdak Farrokhzad-2/+2
Add codegen test for PGO instrumentation. This PR adds a codegen test that makes sure that LLVM actually generates instrumentation code when we enable PGO instrumentation in `rustc`. The second commit updates a test case to the new commandline option syntax introduced in #59874. Without the fix the test still works, but it confusingly creates a directory called `test.profraw`, which usually is the name of the _file_ where profiling data is collected.
2019-04-20Deny rust_2018_idioms globallyPhilipp Hansch-0/+1
2019-04-18Prefix PROFILER_SUPPORT and SANITIZER_SUPPORT test env vars with RUSTC_ to ↵Michael Woerister-2/+2
make things clearer.
2019-04-17Rollup merge of #60003 - petrhosek:llvm-lto-lld, r=cramertjMazdak Farrokhzad-2/+4
LLD is not supported on Darwin Don't enable LLD when LTO is enabled on Darwin.
2019-04-17Deny `internal` in stage0Mateusz Mikuła-3/+1
2019-04-17bump bootstrap; nightly => 1.36.Mazdak Farrokhzad-1/+1
2019-04-17bump bootstrap; remove redundant imports.Mazdak Farrokhzad-2/+0
2019-04-15LLD is not supported on DarwinPetr Hosek-2/+4
Don't enable LLD when LTO is enabled on Darwin.
2019-04-14Rollup merge of #59911 - ↵Mazdak Farrokhzad-31/+0
pnkfelix:revert-pr-59401-to-fix-emit-stack-sizes-gc-sections-ld-gold-bug, r=alexcrichton Revert "compile crates under test w/ -Zemit-stack-sizes" Revert PR #59401 to fix issue #59652 (a stable-to-beta regression). This is result of squashing two revert commits: Revert "compile all crates under test w/ -Zemit-stack-sizes" This reverts commit 7d365cf27f4249fc9b61ba8abfc813abe43f1cb7. Revert "bootstrap: build compiler-builtins with -Z emit-stack-sizes" This reverts commit 8b8488ce8fc047282e7159343f30609417f9fa39. ---- (My intention is that someone can re-add this code again later, either after the `ld.gold` issue itself is fixed, or with safe-guards to check whether `ld.gold` is in use and then issuing warnings about the problems here when they arise.)
2019-04-12Revert PR #59401 to fix issue #59652 (a stable-to-beta regression).Felix S. Klock II-31/+0
This is result of squashing two revert commits: Revert "compile all crates under test w/ -Zemit-stack-sizes" This reverts commit 7d365cf27f4249fc9b61ba8abfc813abe43f1cb7. Revert "bootstrap: build compiler-builtins with -Z emit-stack-sizes" This reverts commit 8b8488ce8fc047282e7159343f30609417f9fa39.
2019-04-12Rollup merge of #59876 - integer32llc:update-trpl-to-mdbook-0.2, r=steveklabnikMazdak Farrokhzad-4/+4
Update TRPL to use mdbook 0.2 I ran linkchecker locally and it passed. Let's see if I did it correctly...
2019-04-11Update TRPL to use mdbook 0.2Carol (Nichols || Goulding)-4/+4
2019-04-10Don't build test helpers for wasm32John Kåre Alsaker-1/+4
2019-04-10Don't require a C compiler on wasm32John Kåre Alsaker-0/+5
2019-04-10Update cmake, cc and compiler_builtins for VS 2019 supportJohn Kåre Alsaker-2/+2
2019-04-07Revert "Auto merge of #57842 - gnzlbg:extract_libtest, r=gnzlbg"Jacob Greenfield-0/+1
This reverts commit 3eb4890dfe6db0279fdd3cda19f9643873ae3db9, reversing changes made to 7a4df3b53da369110984a2b57419c05a53e33b38.
2019-04-04Auto merge of #59089 - petrhosek:llvm-unwind, r=petrhosekbors-0/+8
Support using LLVM's libunwind as the unwinder implementation 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-04-04Auto merge of #59684 - Centril:rollup-n7pnare, r=Centrilbors-0/+5
Rollup of 6 pull requests Successful merges: - #59316 (Internal lints take 2) - #59663 (Be more direct about borrow contract) - #59664 (Updated the documentation of spin_loop and spin_loop_hint) - #59666 (Updated the environment description in rustc.) - #59669 (Reduce repetition in librustc(_lint) wrt. impl LintPass by using macros) - #59677 (rustfix coverage: Skip UI tests with non-json error-format) Failed merges: r? @ghost
2019-04-03Support using LLVM's libunwind as the unwinder implementationPetr Hosek-0/+8
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-04-03Add unstable-options flag to stage!=0flip1995-0/+5
2019-04-03Revert rust-lld place changes.O01eg-2/+1
2019-03-31Fix custom relative libdir.O01eg-11/+36
Uses relative libdir to place libraries on all stages. Adds verbose installation output.
2019-03-30Don't ignore git for LLVM infoJosh Stone-19/+22
2019-03-30Use a single llvm_info variableJosh Stone-13/+8
2019-03-30Use the existing LLVM GitInfo for checking rebuildsJosh Stone-18/+11
2019-03-29Add a new wasm32-unknown-wasi targetAlex Crichton-2/+31
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-29Auto merge of #59522 - Centril:rollup, r=Centrilbors-0/+2
Rollup of 9 pull requests Successful merges: - #59366 (Update books) - #59436 (Update jemalloc-sys to version 0.3.0) - #59454 (Update rustfmt to 1.2.0) - #59462 (Fix error in Rust 2018 + no_core environment) - #59467 (Better diagnostic for binary operation on BoxedValues) - #59473 (Do not emit incorrect borrow suggestion involving macros and fix overlapping multiline spans) - #59480 (Update stdsimd) - #59486 (Visit `ImplItem` in `dead_code` lint) - #59510 (Rename `type_parameters` to `generics` and so on) Failed merges: - #59516 (Update cargo) r? @ghost
2019-03-29Rollup merge of #59366 - ehuss:update-books, r=QuietMisdreavusMazdak Farrokhzad-0/+2
Update books Update reference, book, rust-by-example, edition-guide, embedded-book ## reference 15 commits in 41493ffce5d0e17d54eaf5ec9a995054e2b9aece..27ad493a10364e907ec476e2ad61e8a1614b57e1 2019-03-05 12:32:22 +0100 to 2019-03-26 02:06:15 +0100 - Document wasm_import_module for #[link]. (rust-lang-nursery/reference#554) - Fix tidy error. (rust-lang-nursery/reference#552) - Some minor contributing updates. (rust-lang-nursery/reference#551) - Document `type_length_limit`. (rust-lang-nursery/reference#546) - Add some terms to the glossary. (rust-lang-nursery/reference#547) - Document `target_feature` and `cfg_target_feature`. (rust-lang-nursery/reference#545) - Remove undocumented page (rust-lang-nursery/reference#539) - Reorg and update attributes (rust-lang-nursery/reference#537) - Fix some minor link errors. (rust-lang-nursery/reference#538) - Add linkchecker. (rust-lang-nursery/reference#521) - Expand docs on Macros By Example. (rust-lang-nursery/reference#511) - document #[panic_handler] (rust-lang-nursery/reference#362) - document #[used] (rust-lang-nursery/reference#361) - Note that UB is program-global (rust-lang-nursery/reference#490) - Fix copy-paste error in procedural-macros.md (rust-lang-nursery/reference#533) ## book 16 commits in 9cffbeabec3bcec42d09432bfe7705125c848889..b93ec30bbc7b1b5c2f44223249ab359bed2ed5a6 2019-03-02 08:22:41 -0500 to 2019-03-26 16:54:10 -0400 - Unignore example that now compiles - Fix code snippet (rust-lang/book#1863) - Fix mdbook link text in readme (rust-lang/book#1881) - Wrap to 80 cols - Make sentence more complete (rust-lang/book#1885) - consistenly use increment and decrement (rust-lang/book#1884) - Fix link to Reference's conditional-compilation. (rust-lang/book#1878) - Fix subject/verb agreement - Remove nostarch snapshot files that have been incorporated and checked - haha teach the dictionary steve's name - Add authorship info to the front page - fix accidental <ol>'s (rust-lang/book#1866) - Edits to Macros (rust-lang/book#1848) - Mention `lock` returns `MutexGuard` wrapped in a `LockResult` - Add an example that illustrates NLL (rust-lang/book#1842) - change the parameter name from `type` to `kind` (rust-lang/book#1845) ## rust-by-example 33 commits in 2ce92beabb912d417a7314d6da83ac9b50dc2afb..f68ef3d0f4959f6a7d92a08d9994b117f0f4d32d 2018-11-20 10:10:23 -0500 to 2019-03-12 15:32:12 -0300 - Fix some broken links. (rust-lang/rust-by-example#1161) - Update links in README (rust-lang/rust-by-example#1167) - Add score/lifetimes/trait.md (rust-lang/rust-by-example#1168) - Fix rust-lang/rust-by-example#1147 - No more `open_mode` method (rust-lang/rust-by-example#1164) - Fix for loop description in list print example (rust-lang/rust-by-example#1162) - Add link to Cargo chapter in the index page (rust-lang/rust-by-example#1159) - Fix grammar in sentence about integer notation (rust-lang/rust-by-example#1157) - Do not use deprecated functions from `std::error::Error` trait (rust-lang/rust-by-example#1151) - Update new_types.md to clarify conversion to base type (rust-lang/rust-by-example#1148) - Fix compatibility with Rust 2018 (rust-lang/rust-by-example#1150) - Hello: Fix hint link in `fmt` chapter. (rust-lang/rust-by-example#1146) - Clarify pub(restricted) example a bit (rust-lang/rust-by-example#1133) - Add "literal" to list of macro designators (rust-lang/rust-by-example#1153) - Minor fixes for the macros chapter (rust-lang/rust-by-example#1113) - Use new book links instead of the old second-edition ones (rust-lang/rust-by-example#1143) - Recommend implementing Display over ToString (rust-lang/rust-by-example#1145) - Remove unused import and format with `rustfmt` (rust-lang/rust-by-example#1144) - fix typo (rust-lang/rust-by-example#1142) - Update syntax for 2018 Edition (rust-lang/rust-by-example#1136) - Added two missing full stops (rust-lang/rust-by-example#1138) - Removed unnecessary spaces before macro designators in macros/dry (rust-lang/rust-by-example#1139) - fix install mdbook command (rust-lang/rust-by-example#1128) - Changed word `function` to `type` in comment of fn area (rust-lang/rust-by-example#1132) - Added two missing backticks in generics/multi_bounds (rust-lang/rust-by-example#1129) - Fixed small logic error in error/option_unwrap/and_then (rust-lang/rust-by-example#1127) - Fix typo (rust-lang/rust-by-example#1125) - The code of conduct link was dead. I fixed it. (rust-lang/rust-by-example#1122) - I added a space in the Display fmt for Complex (rust-lang/rust-by-example#1123) - Fix Rust install link in the index (rust-lang/rust-by-example#1124) - Update cargo conventions section (rust-lang/rust-by-example#1121) - Fixed curly braces in the `To and from Strings` chapter to be parentheses (rust-lang/rust-by-example#1120) - Edit a typo (rust-lang/rust-by-example#1119) - Fixes rust-lang/rust-by-example#1115 by correcting the typo from into_iterator to into_iter (rust-lang/rust-by-example#1118) ## edition-guide 1 commits in aa0022c875907886cae8f3ef8e9ebf6e2a5e728d..b56ddb11548450a6df4edd1ed571b2bc304eb9e6 2019-02-27 22:10:39 -0800 to 2019-03-10 10:23:16 +0100 - Links fixes (rust-lang-nursery/edition-guide#133) ## embedded-book 6 commits in 9e656ead82bfe869493dec82653a52e27fa6a05c..07fd3880ea0874d82b1d9ed30ad3427ec98b4e8a 2019-03-03 16:03:26 +0000 to 2019-03-27 15:40:52 +0000 - Fix test errors. (rust-embedded/book#180) - Update qemu.md (rust-embedded/book#170) - Update no-std.md to remove obsolete FAQ link (rust-embedded/book#177) - We've come a long way :) (rust-embedded/book#176) - Correct link to team (rust-embedded/book#175) - Update some book links to their new homes. (rust-embedded/book#173)
2019-03-29Auto merge of #59303 - euclio:remove-rebuild-trigger, r=cuviperbors-15/+33
replace llvm-rebuild-trigger with submodule commit hash As mentioned in #59285. This PR removes the need to update the `llvm-rebuild-trigger` file. Instead, the latest commit hash of the appropriate LLVM submodule will be stored in the stamp file and used to detect if a build is required. Fixes #42405. Fixes #54959. Fixes #55537.
2019-03-29Rollup merge of #59401 - japaric:compiler-builtins-stack-sizes, r=alexcrichtonMazdak Farrokhzad-0/+31
bootstrap: build crates under libtest with -Z emit-stack-sizes Please see the comment in the diff for the rationale. This change adds a `.stack_sizes` linker section to `libcompiler_builtins.rlib` but this section is discarded by the linker by default so it won't affect the binary size of most programs. It will, however, negatively affect the binary size of programs that link to a recent release of the `cortex-m-rt` crate because of the linker script that crate provides, but I have proposed a PR (rust-embedded/cortex-m-rt#186) to solve the problem (which I originally introduced :-)). This change does increase the size of the `libcompiler_builtins.rlib` artifact we distribute but the increase is in the order of (a few) KBs. r? @alexcrichton
2019-03-28Rollup merge of #59398 - phansch:rustfix_coverage, r=oli-obkMazdak Farrokhzad-0/+21
Add a way to track Rustfix UI test coverage This came out of the first Rustfix WG meeting. One of the goals is to enable Rustfix tests for all UI tests that trigger lints with `MachineApplicable` suggestions. In order to do that we first want to create a tracking issue that lists all files with missing `// run-rustfix` headers. This PR adds a `--rustfix-coverage` flag to `./x.py` and compiletest to list the files with the missing headers in `/tmp/rustfix_missing_coverage.txt`. From that file we can create the tracking issue and at some point also enforce the `// run-rustfix` flag on UI tests with `MachineApplicable` lints.
2019-03-28Rollup merge of #59351 - phil-opp:llvm-ar, r=alexcrichtonMazdak Farrokhzad-0/+1
Include llvm-ar with llvm-tools component Adds the `llvm-ar` tool to the `llvm-tools` component. This is useful for [building and linking native code](https://doc.rust-lang.org/cargo/reference/build-scripts.html#case-study-building-some-native-code) in cargo build scripts without needing to use the platform specific `ar`. According to #58663 it is also useful for WASM. `llvm-ar` is very small (~82KB), so it does not significantly increase the size of the `llvm-tools` component. Fixes #58663
2019-03-28Rollup merge of #58848 - GuillaumeGomez:fix-cache-issues, ↵Mazdak Farrokhzad-8/+19
r=Mark-Simulacrum,ollie27 Prevent cache issues on version updates Fixes #58827. cc @rust-lang/infra
2019-03-27Update booksEric Huss-0/+2
2019-03-27replace llvm-rebuild-trigger with commit hashAndy Russell-15/+33
2019-03-26Fix error index CSS file nameGuillaume Gomez-0/+1
2019-03-26Handle RUSTDOC_RESOURCE_SUFFIX env variable for rustdoc buildGuillaume Gomez-0/+11
2019-03-26Add resource suffix for libtest and proc_macro as wellGuillaume Gomez-2/+2
2019-03-26Prevent cache issues on version updatesGuillaume Gomez-8/+7
2019-03-26Rollup merge of #59197 - kornelski:redir, r=steveklabnikGuillaume Gomez-2/+2
Exclude old book redirect stubs from search engines Adds `<meta name="robots" content="noindex,follow">` to the `<head>` of old stub pages pointing to the second edition of the book. This is continuation of https://github.com/rust-lang/book/pull/1788
2019-03-25compile all crates under test w/ -Zemit-stack-sizesJorge Aparicio-13/+20
2019-03-25Save coverage file in build_base path, not /tmpPhilipp Hansch-1/+1
2019-03-25Fix two bootstrap testsPhilipp Hansch-0/+2
2019-03-24bootstrap: build compiler-builtins with -Z emit-stack-sizesJorge Aparicio-0/+24
2019-03-24Add a way to track Rustfix UI test coveragePhilipp Hansch-0/+19
This came out of the first Rustfix WG meeting. One of the goals is to enable Rustfix tests for all UI tests that trigger lints with `MachineApplicable` suggestions. In order to do that we first want to create a tracking issue that lists all files with missing `// run-rustfix` headers. This PR adds a `--rustfix-coverage` flag to `./x.py` and compiletest to list the files with the missing headers in `/tmp/rustfix_missing_coverage.txt`. From that file we can create the tracking issue and at some point also enforce the `// run-rustfix` flag on UI tests with `MachineApplicable` lints.
2019-03-22Rollup merge of #59309 - o01eg:verbose-copy-files, r=alexcrichtonMazdak Farrokhzad-0/+12
Add messages for different verbosity levels. Output copy actions.
2019-03-21Include llvm-ar with llvm-tools componentPhilipp Oppermann-0/+1