about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
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
2019-03-20Auto merge of #58897 - Mark-Simulacrum:tool-rework, r=alexcrichtonbors-62/+99
Rework how bootstrap tools are built This makes bootstrap tools buildable and testable in stage 0 with the downloaded bootstrap compiler, futhermore, it makes it such that they cannot be built in any other stage. Notably, this will also mean that compiletest may need to wait a cycle before it can use changes to `libtest`, as it no longer depends on the in-tree libtest.
2019-03-20Auto merge of #58791 - denzp:asm-compile-tests, r=alexcrichtonbors-0/+7
Introduce assembly tests suite The change introduces a new test suite - **Assembly** tests. The motivation behind this is an ability to perform end-to-end codegen testing with LLVM backend. Turned out, NVPTX backend sometimes missing common Rust features (`i128` and libcalls in the past, and still full atomics support) due to different reasons. Prior to this change, basic NVPTX assembly tests were implemented within `run-make` suite. Now, it's easier to write additional and maintain existing tests for the target. cc @gnzlbg @peterhj cc @eddyb I adjusted mangling scheme expectation, so there is no need to change the tests for #57967
2019-03-20Add messages for different verbosity levels.O01eg-0/+12
Output copy actions
2019-03-19Remove libterm from bootstrapgnzlbg-1/+0
2019-03-18Auto merge of #58847 - bjorn3:remove_metadata_only_cg, r=alexcrichtonbors-16/+8
Remove metadata only codegen backend It is unused and probably broken at the moment.
2019-03-16Merge remote-tracking branch 'upstream/master' into asm-compile-testsDenys Zariaiev-15/+40
2019-03-16Rollup merge of #59204 - o01eg:diag-rustdoc, r=alexcrichtonkennytm-2/+8
Output diagnostic information for rustdoc Use the information same as rustc.
2019-03-16Rollup merge of #59175 - Zoxc:fix-process-test, r=alexcrichtonkennytm-1/+1
Don't run test launching `echo` since that doesn't exist on Windows
2019-03-16Rollup merge of #59173 - emilio:llvm-suffix, r=Mark-Simulacrumkennytm-1/+27
bootstrap: Default to a sensible llvm-suffix. I used version-channel-sha, hopefully that should work. I checked that bootstrap builds, but I cannot check anything else since the llvm build process is started from cargo, and thus calls clang, and thus I hit the same bug I hope to fix with this change. Hopefully fixes #59034.
2019-03-16Fix formattingbjorn3-1/+1
2019-03-16[bootstrap] Remove llvm.enabled configbjorn3-17/+9
2019-03-15rustbuild: remove obsolete fulldeps behavior from src/test/pretty tests, and ↵Eduard-Mihai Burtescu-10/+3
enable them by default.
2019-03-15Output diagnostic information for rustdoc.O01eg-2/+8
Use the information same as rustc.
2019-03-14Exclude old book redirect stubs from search enginesKornel-2/+2
2019-03-14Run RustdocUi earlierJohn Kåre Alsaker-1/+1
2019-03-14bootstrap: Default to a sensible llvm-suffix.Emilio Cobos Álvarez-1/+27
I used version-channel-sha, hopefully that should work. I checked that bootstrap builds, but I cannot check anything else since the llvm build process is started from cargo, and thus calls clang, and thus I hit the same bug I hope to fix with this change. Hopefully fixes #59034.
2019-03-13Merge remote-tracking branch 'upstream/master' into asm-compile-testsDenys Zariaiev-55/+177
2019-03-12Auto merge of #58330 - GuillaumeGomez:rustdoc-js-non-std, ↵bors-10/+55
r=QuietMisdreavus,Mark-Simulacrum Add rustdoc JS non-std tests @QuietMisdreavus: You asked it, here it is! r? @QuietMisdreavus
2019-03-09Rollup merge of #58676 - euclio:bootstrap-python, r=alexcrichtonMazdak Farrokhzad-8/+10
look for python2 symlinks before bootstrap python Before this commit, if you're running x.py directly on a system where `python` is symlinked to Python 3, then the `python` config option will default to a Python 3 interpreter. This causes debuginfo tests to fail with an opaque error message, since they have a hard requirement on Python 2. This commit modifies the Python probe behavior to look for python2.7 and python2 *before* using the interpreter used to execute `x.py`.