about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2021-01-19No longer require unstable for jsondocck, only build it for json testsRune Tynan-3/+8
2021-01-19Address review v2Rune Tynan-6/+1
2021-01-19Add jsondocck tool, and use it for rustdoc JSONRune Tynan-0/+8
2021-01-17Rollup merge of #81064 - Mark-Simulacrum:support-stage1-check, r=jyn514Mara Bos-21/+39
Support non-stage0 check Seems to work locally - a full stage 1 check succeeds, building std (because we can't get away with checking it), and then checking the compiler and other tools. This ran into the problem that a unconditional x.py check in stage 1 *both* checks and builds stage 1 std, and then has to clean up because for some reason the rmeta and rlib artifacts conflict (though I'm not actually entirely sure why, but it doesn't seem worth digging in in too much detail). Ideally we wouldn't be building and checking like that but it's a minor worry as checking std is pretty fast and you can avoid it if you're aiming for speed by passing the compiler (e.g., compiler/rustc) explicitly. r? ```@jyn514```
2021-01-17Rollup merge of #80932 - jyn514:download-windows-llvm, r=Mark-SimulacrumMara Bos-23/+49
Allow downloading LLVM on Windows and MacOS - Don't ignore packaging `llvm/lib/` for `rust-dev` when LLVM is linked statically - Add `link-type.txt` so bootstrap knows whether llvm was linked statically or dynamically - Don't assume CI LLVM is linked dynamically in `bootstrap::config` - Fall back to dynamic linking if `link-type.txt` doesn't exist - Fix existing bug that split the output of `llvm-config` on lines, not spaces - Only special case MacOS when dynamic linking. Static linking works fine. - Enable building LLVM tests This works around the following llvm bug: ``` llvm-config: error: component libraries and shared library llvm-config: error: missing: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/lib/libgtest.a llvm-config: error: missing: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/lib/libgtest_main.a llvm-config: error: missing: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/lib/libLLVMTestingSupport.a thread 'main' panicked at 'command did not execute successfully: "/home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config" "--libfiles" ``` I'm not sure why llvm-config thinks these are required, but to avoid the error, this builds them anyway. - Bump version of `download-ci-llvm-stamp` `src/llvm-project` hasn't changed, but the generated tarball has. Fixes https://github.com/rust-lang/rust/issues/77084. # Current Status This works on both MacOS and Windows! :tada: :tada: Thanks to ```@nagisa,``` ```@halkcyon,``` ```@Lokathor,``` ```@jryans,``` and ```@poliorcetics``` for helping me test! The `if-available` check now supports all tier 1 platforms. Although only x64 apple and x64 msvc have been tested, none of the changes here are Windows or Mac specific, and I expect this to work anywhere that LLVM artifacts are uploaded to CI (i.e. the `rust-dev` component exists). ## Windows Note that if you have an old version of MSVC build tools you'll need to update them. VS Build Tools 2019 14.28 and later are known to work. With old tools, you may see an error like the following: ``` error LNK2001: unresolved external symbol __imp___std_init_once_complete ```
2021-01-16Rollup merge of #80901 - jyn514:better-colors, r=Mark-SimulacrumMara Bos-0/+10
Make `x.py --color always` apply to logging too Follow-up to https://github.com/rust-lang/rust/pull/78548, https://github.com/rust-lang/rust/pull/79004. r? ```@Mark-Simulacrum```
2021-01-16Allow configuring the default stage for `x.py check`Joshua Nelson-1/+2
2021-01-16Print which stage is being checked (now that it may not be stage0)Joshua Nelson-7/+14
2021-01-16Support non-stage0 checkMark Rousskov-13/+23
2021-01-15Add all tier 1 platforms to supported platforms for "if-available"Joshua Nelson-1/+14
... and update the comment in `config.toml.example`
2021-01-15Allow downloading LLVM on WindowsJoshua Nelson-22/+35
- Don't ignore packaging `llvm/lib/` for `rust-dev` when LLVM is linked statically - Add `link-type.txt` so bootstrap knows whether llvm was linked statically or dynamically - Don't assume CI LLVM is linked dynamically in `bootstrap::config` - Fall back to dynamic linking if `link-type.txt` doesn't exist - Fix existing bug that split the output of `llvm-config` on lines, not spaces - Enable building LLVM tests This works around the following llvm bug: ``` llvm-config: error: component libraries and shared library llvm-config: error: missing: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/lib/libgtest.a llvm-config: error: missing: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/lib/libgtest_main.a llvm-config: error: missing: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/lib/libLLVMTestingSupport.a thread 'main' panicked at 'command did not execute successfully: "/home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config" "--libfiles" ``` I'm not sure why llvm-config thinks these are required, but to avoid the error, this builds them anyway. - Temporarily set windows as the try builder. This should be reverted before merging. - Bump version of `download-ci-llvm-stamp` `src/llvm-project` hasn't changed, but the generated tarball has. - Only special case MacOS when dynamic linking. Static linking works fine. - Store `link-type.txt` to the top-level of the tarball This allows writing the link type unconditionally. Previously, bootstrap had to keep track of whether the file IO *would* succeed (it would fail if `lib/` didn't exist), which was prone to bugs. - Make `link-type.txt` required Anyone downloading this from CI should be using a version of bootstrap that matches the version of the uploaded artifacts. So a missing link-type indicates a bug in x.py.
2021-01-12Rollup merge of #79997 - coolreader18:wasm-reactor, r=alexcrichtonYuki Okushi-8/+10
Emit a reactor for cdylib target on wasi Fixes #79199, and relevant to #73432 Implements wasi reactors, as described in WebAssembly/WASI#13 and [`design/application-abi.md`](https://github.com/WebAssembly/WASI/blob/master/design/application-abi.md) Empty `lib.rs`, `lib.crate-type = ["cdylib"]`: ```shell $ cargo +reactor build --release --target wasm32-wasi Compiling wasm-reactor v0.1.0 (/home/coolreader18/wasm-reactor) Finished release [optimized] target(s) in 0.08s $ wasm-dis target/wasm32-wasi/release/wasm_reactor.wasm >reactor.wat ``` `reactor.wat`: ```wat (module (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "wasi_snapshot_preview1" "fd_prestat_get" (func $__wasi_fd_prestat_get (param i32 i32) (result i32))) (import "wasi_snapshot_preview1" "fd_prestat_dir_name" (func $__wasi_fd_prestat_dir_name (param i32 i32 i32) (result i32))) (import "wasi_snapshot_preview1" "proc_exit" (func $__wasi_proc_exit (param i32))) (import "wasi_snapshot_preview1" "environ_sizes_get" (func $__wasi_environ_sizes_get (param i32 i32) (result i32))) (import "wasi_snapshot_preview1" "environ_get" (func $__wasi_environ_get (param i32 i32) (result i32))) (memory $0 17) (table $0 1 1 funcref) (global $global$0 (mut i32) (i32.const 1048576)) (global $global$1 i32 (i32.const 1049096)) (global $global$2 i32 (i32.const 1049096)) (export "memory" (memory $0)) (export "_initialize" (func $_initialize)) (export "__data_end" (global $global$1)) (export "__heap_base" (global $global$2)) (func $__wasm_call_ctors (call $__wasilibc_initialize_environ_eagerly) (call $__wasilibc_populate_preopens) ) (func $_initialize (call $__wasm_call_ctors) ) (func $malloc (param $0 i32) (result i32) (call $dlmalloc (local.get $0) ) ) ;; lots of dlmalloc, memset/memcpy, & libpreopen code ) ``` I went with repurposing cdylib because I figured that it doesn't make much sense to have a wasi shared library that can't be initialized, and even if someone was using it adding an `_initialize` export is a very small change.
2021-01-10Make `--color always` apply to logging tooJoshua Nelson-0/+10
2021-01-10Rollup merge of #80820 - nagisa:nagisa/dcl-nixos, r=Mark-SimulacrumYuki Okushi-8/+15
Support `download-ci-llvm` on NixOS In particular, the CI built `libLLVM-*.so` needs to have `libz.so` RPATHed so that binaries like `llvm-config` work at all.
2021-01-09Support `download-ci-llvm` on NixOSSimonas Kazlauskas-8/+15
In particular, the CI built `libLLVM-*.so` needs to have `libz.so` RPATHed so that binaries like `llvm-config` work at all.
2021-01-08Add wasi-exec-model cg option for emitting wasi reactorsNoah-8/+10
2021-01-07bootstrap: fix x.py install not working with relative prefixPietro Albini-55/+44
2021-01-05Auto merge of #80708 - JohnTitor:rollup-6esk027, r=JohnTitorbors-14/+41
Rollup of 12 pull requests Successful merges: - #80442 (Mention Arc::make_mut and Rc::make_mut in the documentation of Cow) - #80533 (bootstrap: clippy fixes) - #80538 (Add check for `[T;N]`/`usize` mismatch in astconv) - #80612 (Remove reverted change from relnotes) - #80627 (Builder: Warn if test file does not exist) - #80637 (Use Option::filter instead of open-coding it) - #80643 (Move variable into the only branch where it is relevant) - #80656 (Fixed documentation error for `std::hint::spin_loop`) - #80666 (Fix missing link for "fully qualified syntax") - #80672 (./x.py clippy: allow the most noisy lints) - #80677 (doc -- list edit for consistency) - #80696 (make sure that promoteds which fail to evaluate in dead const code behave correctly) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-01-05Rollup merge of #80672 - matthiaskrgr:xpy_clippy_less_noise, r=Mark-SimulacrumYuki Okushi-0/+11
./x.py clippy: allow the most noisy lints This silences the following clippy lints in ./x.py clippy: many_single_char_names (there are a lot of warnings caused by stdarch) collapsible_if (can reduce readability) type_complexity missing_safety_doc (there are almost 3K warnings issued) too_many_arguments needless_lifetimes (people want 'tcx lifetimes etc) wrong_self_convention (warns about from_..(), to_..(), into_..().. fns that do or do not take self by reference. Just for clarification; this only changes the output of `x.py clippy` inside the rustc repo and does not change anything about clippy or how `cargo clippy` is run on peoples crates.
2021-01-05Rollup merge of #80627 - bugadani:warn, r=Mark-SimulacrumYuki Okushi-1/+13
Builder: Warn if test file does not exist Running `./x.py test` with a file that does not exists (but where the path belongs to a test suite) silently ignores the missing file and runs the whole test suite. This PR prints a warning to reduce the potential surprise factor. Closes #80621
2021-01-05Rollup merge of #80533 - matthiaskrgr:bootstrap_clppy, r=Mark-SimulacrumYuki Okushi-13/+17
bootstrap: clippy fixes addresses: clippy::or_fun_call clippy::single_char_add_str clippy::comparison_to_empty clippy::or_fun_call
2021-01-05Auto merge of #80426 - jyn514:bootstrap-caching, r=Mark-Simulacrumbors-10/+11
Don't use `self.date` unconditionally for `program_out_of_date()` This avoids unnecessary cache invalidations for programs not affected by the stage0 version (which is everything except the stage0 compiler itself). The redundant invalidations weren't noticed until now because they only showed up on stage0 bumps, at which point people are used to rebuilding everything anyway. I noticed it in https://github.com/rust-lang/rust/pull/79540 because I wasn't adding `self.date` to the stamp file (because I didn't realize it was necessary). Rather than adding self.date I thought it was better to remove it from the cache key.
2021-01-04Builder: Warn if test file does not existDániel Buga-1/+13
2021-01-04./x.py clippy: allow the most noisy lintsMatthias Krüger-0/+11
This silences the following clippy lints in ./x.py clippy: many_single_char_names (there are a lot of warnings caused by stdarch) collapsible_if (can reduce readability) type_complexity missing_safety_doc (there are almost 3K warnings issued) too_many_arguments needless_lifetimes (people want 'tcx lifetimes etc) wrong_self_convention (warns about from_..(), to_..(), into_..().. fns that do or do not take self by reference.
2021-01-02Rollup merge of #80574 - jyn514:clean-bootstrap, r=Mark-SimulacrumMara Bos-0/+1
Clean bootstrap artifacts on `x.py clean` Closes https://github.com/rust-lang/rust/issues/76519 r? `@Mark-Simulacrum`
2021-01-02Auto merge of #79883 - frewsxcv:frewsxcv-san, r=shepmasterbors-9/+28
Enable ASan, TSan, UBSan for aarch64-apple-darwin. I confirmed ASan, TSan, UBSan all work for me locally with `clang` on my new Macbook Air. ~This requires https://github.com/rust-lang/llvm-project/pull/86~
2021-01-01Give a better error for download-ci-llvm if .xz is not supportedJoshua Nelson-1/+6
Previously: ``` curl: (22) The requested URL returned error: 404 failed to run: curl -# -y 30 -Y 10 --connect-timeout 30 --retry 3 -Sf -o /tmp/tmp6ptXJV https://ci-artifacts.rust-lang.org/rustc-builds/99ad5a1a2824fea1ecf60068fd3636beae7ea2da/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.gz ``` Now: ``` error: XZ support is required to download LLVM help: consider disabling `download-ci-llvm` or using a different version of python Build completed unsuccessfully in 0:00:00 ```
2021-01-01Clean bootstrap artifacts on `x.py clean`Joshua Nelson-0/+1
2020-12-31Merge remote-tracking branch 'origin/master' into frewsxcv-sanCorey Farwell-1019/+815
2020-12-31Rollup merge of #80532 - tmiasko:rm;, r=Mark-SimulacrumDylan DPC-1/+1
remove unnecessary trailing semicolon from bootstrap
2020-12-31bootstrap: use the correct paths during ./x.py installPietro Albini-81/+45
2020-12-31bootstrap: change the dist outputs to GeneratedTarballPietro Albini-48/+64
The struct will allow to store more context on the generated tarballs.
2020-12-31bootstrap: never delete the tarball temporary directoryPietro Albini-9/+3
Files in the temporary directory are used by ./x.py install.
2020-12-31Auto merge of #80435 - pietroalbini:compression-formats, r=Mark-Simulacrumbors-6/+24
Only produce .xz tarballs on CI This PR adds a `./configure` option to choose which tarball compression formats to produce, and changes our CI configuration to only produce `.xz` tarballs. The release process will then recompress everything into `.gz` when producing a release. This will drastically reduce our storage costs for CI artifacts, as we'd stop storing the same data twice. **Stable, beta and nightly releases will not be affected by this at all.** Before landing this we'll need to increase the VM size of our release process, to recompress everything in a reasonable amount of time. r? `@Mark-Simulacrum`
2020-12-31bootstrap: clippy fixesMatthias Krüger-14/+18
addresses: clippy::or_fun_call clippy::single_char_add_str clippy::comparison_to_empty clippy::or_fun_call
2020-12-30Auto merge of #80530 - m-ou-se:rollup-zit69ko, r=m-ou-sebors-2/+4
Rollup of 9 pull requests Successful merges: - #78934 (refactor: removing library/alloc/src/vec/mod.rs ignore-tidy-filelength) - #79479 (Add `Iterator::intersperse`) - #80128 (Edit rustc_ast::ast::FieldPat docs) - #80424 (Don't give an error when creating a file for the first time) - #80458 (Some Promotion Refactoring) - #80488 (Do not create dangling &T in Weak<T>::drop) - #80491 (Miri: make size/align_of_val work for dangling raw ptrs) - #80495 (Rename kw::Invalid -> kw::Empty) - #80513 (Add regression test for #80062) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2020-12-30Rollup merge of #80424 - jyn514:bootstrap-cleanup, r=Mark-SimulacrumMara Bos-2/+4
Don't give an error when creating a file for the first time Previously, `os.remove` would always give a FileNotFound error the first time you called it, causing bootstrap to make unnecessary copies. This now only calls `remove()` if the file exists, avoiding the unnecessary error. This is a pretty small cleanup but I think it's useful. Taken from https://github.com/rust-lang/rust/pull/79540.
2020-12-30bootstrap: extract from any compression algorithm during distcheckPietro Albini-5/+2
2020-12-30Bump bootstrap compiler to 1.50 betaMark Rousskov-8/+2
2020-12-30Rollup merge of #80461 - rust-lang:tmandry-patch-1, r=Mark-SimulacrumYuki Okushi-1/+6
Add llvm-libunwind change to bootstrap CHANGELOG From #77703. This doesn't need a `changelog-seen` version bump because the old values aren't accepted anymore, meaning anyone who was using this had to change it already. r? ``@Mark-Simulacrum``
2020-12-30remove unnecessary trailing semicolon from bootstrapTomasz Miąsko-1/+1
2020-12-29Remove `compile-fail` test suiteVadim Petrochenkov-11/+1
2020-12-29bootstrap: add the dist.compression-formats optionPietro Albini-1/+22
The option allows to add or remove compression formats used while producing dist tarballs.
2020-12-28Add llvm-libunwind change to bootstrap CHANGELOGTyler Mandry-1/+6
From #77703.
2020-12-28Rollup merge of #80434 - pietroalbini:tarball-temp-dir, r=Mark-SimulacrumDylan DPC-1/+1
bootstrap: put the component name in the tarball temp dir path This should not matter right now, but if we ever parallelize rustbuild this will avoid tarball contents being merged together. r? `@Mark-Simulacrum`
2020-12-28Rollup merge of #80362 - jyn514:rustc-macros, r=ehussDylan DPC-6/+9
Document rustc_macros on nightly-rustc Fixes https://github.com/rust-lang/rust/issues/80345. ![image](https://user-images.githubusercontent.com/23638587/103113442-b7ba2d00-4628-11eb-8a4d-c542f2d170e1.png) ![image](https://user-images.githubusercontent.com/23638587/103113448-bc7ee100-4628-11eb-8657-2d72e88de656.png) r? ``@ehuss``
2020-12-28bootstrap: put the component name in the tarball temp dir pathPietro Albini-1/+1
This should not matter right now, but if we ever parallelize rustbuild this will avoid tarball contents being merged together.
2020-12-28Auto merge of #80397 - Mark-Simulacrum:fix-bare-tarball, r=pietroalbinibors-1/+7
Use package name for top-level directory in bare tarballs This fixes a bug introduced by #79788. r? `@pietroalbini`
2020-12-27Don't use `self.date` unconditionally for `program_out_of_date()`Joshua Nelson-10/+11
This avoids unnecessary cache invalidations for programs not affected by the stage0 version (which is everything except the stage0 compiler itself). The redundant invalidations weren't noticed until now because they only showed up on stage0 bumps, at which point people are used to rebuilding everything anyway. I noticed it because I wasn't adding `self.date` to the stamp file (because I didn't realize it was necessary). Rather than adding self.date I thought it was better to remove it from the cache key.
2020-12-27Don't give an error when creating a file for the first timeJoshua Nelson-2/+4
Previously, `os.remove` would always give a FileNotFound error the first time you called it, causing bootstrap to make unnecessary copies. This now only calls `remove()` if the file exists, avoiding the unnecessary error.