summary refs log tree commit diff
path: root/src/bootstrap/dist.rs
AgeCommit message (Collapse)AuthorLines
2023-05-06bootstrap: add .gitmodules to the sourcesKrasimir Georgiev-0/+1
The bootstrap builder now expects this file to exist: https://github.com/rust-lang/rust/blob/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/src/bootstrap/builder.rs#L494
2023-04-14Auto merge of #110263 - jyn514:ui-fulldeps-llvm, r=albertlarsan68bors-0/+14
Add `libLLVM.so` to the target libdir when download-rustc is enabled Previously, we would only add it to the host libdir, which meant it couldn't be loaded by `ui-fulldeps` tests that used rustc_private. Fixes https://github.com/rust-lang/rust/issues/110225, fixes https://github.com/rust-lang/rust/issues/110226.
2023-04-13automatically update the LLVM submoduleKrishna Ramasimha-0/+2
2023-04-12Add `libLLVM.so` to the target libdir when download-rustc is enabledjyn-0/+14
Previously, we would only add it to the host libdir, which meant it couldn't be loaded by `ui-fulldeps` tests that used rustc_private.
2023-04-04Make rust-docs optional for the Windows MSI installer.Eric Huss-22/+29
2023-04-02Fix macos pkg installer when rust-docs is not available.Eric Huss-1/+1
2023-03-24Rename 'src/bootstrap/native.rs' to llvm.rsRobin Hafid-6/+6
Renamed 'native.rs' to 'llvm.rs', also moved `TestHelpers` to `test.rs`.Replaced all the `native.rs` ocurrences at `src/bootstrap` files to `llvm.rs`
2023-03-21Auto merge of #108262 - ChrisDenton:libntdll, r=Mark-Simulacrumbors-0/+4
Distribute libntdll.a with windows-gnu toolchains This allows the OS loader to load essential functions (e.g. read/write file) at load time instead of lazily doing so at runtime. r? libs
2023-03-11Rename `config.toml.example` to `config.example.toml`Thom Chiovoloni-1/+1
2023-03-07Rollup merge of #108581 - jfgoog:include-mingw-linker, r=petrochenkovMatthias Krüger-2/+2
Add a new config flag, dist.include-mingw-linker. The flag controls whether to copy the linker, DLLs, and various libraries from MinGW into the rustc toolchain. It applies only when the host or target is pc-windows-gnu. The flag is true by default to preserve existing behavior.
2023-03-04Add comment on what libs should be in target_libsChris Denton-0/+3
2023-03-04Add check for dry runJakub Beránek-5/+1
2023-03-04Create BOLT build steps to avoid running BOLT multiple times on the same fileJakub Beránek-2/+118
2023-03-04Apply BOLT optimizations without rebuilding LLVMJakub Beránek-1/+22
2023-02-28Add a new config flag, dist.include-mingw-linker.James Farrell-2/+2
The flag controls whether to copy the linker, DLLs, and various libraries from MinGW into the rustc toolchain. It applies only when the host or target is pc-windows-gnu. The flag is true by default to preserve existing behavior.
2023-02-20Distribute libntdll.a with windows-gnu toolchainsChris Denton-0/+1
This allows loading some essential functions (e.g. read/write file) at load time instead of lazily.
2023-02-16Remove save-analysis.Nicholas Nethercote-2/+9
Most tests involving save-analysis were removed, but I kept a few where the `-Zsave-analysis` was an add-on to the main thing being tested, rather than the main thing being tested. For `x.py install`, the `rust-analysis` target has been removed. For `x.py dist`, the `rust-analysis` target has been kept in a degenerate form: it just produces a single file `reduced.json` indicating that save-analysis has been removed. This is necessary for rustup to keep working. Closes #43606.
2023-01-23Bring tests back into rustc source tarballTomasz Miąsko-1/+1
They were missing after recent move from src/test to tests.
2023-01-23Rollup merge of #106886 - dtolnay:fastinstall, r=Mark-SimulacrumYuki Okushi-6/+16
Make stage2 rustdoc and proc-macro-srv disableable in x.py install Rustdoc will build if `[build] tools = ["rustdoc"]` is set, and rust-analyzer-proc-macro-srv will build if `[build] tools = ["rust-analyzer"]` is set. On my machine skipping these tools speeds up `x.py install` from 7m15s to 6m08s (0m43s for rustdoc and 0m24s for rust-analyzer-proc-macro-srv). This is a significant speedup, since I never use rust-analyzer-proc-macro-srv, and I practically never need to use a custom build of rustdoc.
2023-01-17Re-enable building rust-analyzer on riscv64Josh Stone-6/+0
It was disabled in #75103 due to an LLVM bug, but followup comments have confirmed that it builds fine on Fedora with LLVM 15.
2023-01-14Make stage2 rustdoc and proc-macro-srv disableable in x.py installDavid Tolnay-6/+16
2023-01-03ensure lld's step unconditionally for RustDev componentRémy Rakic-5/+2
2023-01-03bootstrap dist: ensure LLD's stepRémy Rakic-0/+6
2022-12-22Use LLVM_CMAKE_DIR for lld buildNikita Popov-2/+5
LLVM_CONFIG_PATH is no longer supported as of LLVM 16, switch to using the cmake module instead. We separately return the llvm-config and cmake directory paths, because llvm-config always refers to the host binary, while the cmake directory is for the target triple.
2022-12-13Adjust miri to still be optionalMark Rousskov-25/+31
We don't distribute a miri build for beta/stable so it needs to be kept optional. In the future it likely makes sense to switch the miri *artifacts* to always be built, but the rustup component to not be included -- this will avoid some of this pain.
2022-11-26Revert "Don't set `is_preview` for clippy and rustfmt"Joshua Nelson-0/+4
This reverts commit fb3e724d7602675f147a9b80e70fb6bd6512738c, which broke `rustup update` for anyone with clippy or rustfmt installed.
2022-11-25Rollup merge of #103648 - jyn514:no-preview, r=Mark-SimulacrumMatthias Krüger-4/+0
Don't set `is_preview` for clippy and rustfmt These have been shipped on stable for many years now and it would be very disruptive to ever remove them. Remove the `-preview` suffix from their dist components. Based on https://github.com/rust-lang/rust/pull/102565.
2022-11-24Don't set `is_preview` for clippy and rustfmtJoshua Nelson-4/+0
These have been shipped on stable for many years now and it would be very disruptive to ever remove them. Remove the `-preview` suffix from their dist components.
2022-11-20dist: Ensure UEFI rlibs are all COFFNicholas Bishop-0/+38
If clang isn't the C compiler used for the UEFI targets, or if the wrong `--target` is passed to clang, we will get ELF objects in some rlibs. This will cause problems at link time when trying to compile a UEFI program that uses any of those objects. Add a check to the dist step for UEFI targets that reads each rlib with the `object` crate and fails with an error if any non-COFF objects are found.
2022-11-13Make all download functions need only Config, not BuilderJoshua Nelson-2/+2
This also adds a new `mod download` instead of scattering the download code across `config.rs` and `native.rs`.
2022-11-12Distinguish `--dry-run` from the automatic dry run checkJoshua Nelson-6/+6
2022-11-02merge JsonStd and Std stepsviandoxdev-1/+6
2022-10-29Revert "Make the `c` feature for `compiler-builtins` opt-in instead of inferred"Mark Rousskov-15/+17
This reverts commit 3acb505ee560770c62bad5362f6caf7567d467b9 (PR #101833). The changes in this commit caused several bugs or at least incompatibilies. For now we're reverting this commit and will re-land it alongside fixes for those bugs.
2022-10-10Auto merge of #94381 - Kobzol:llvm-bolt, r=Mark-Simulacrumbors-0/+4
Use BOLT in CI to optimize LLVM This PR adds an optimization step in the Linux `dist` CI pipeline that uses [BOLT](https://github.com/llvm/llvm-project/tree/main/bolt) to optimize the `libLLVM.so` library built by boostrap. Steps: - [x] Use LLVM 15 as a bootstrap compiler and use it to build BOLT - [x] Compile LLVM with support for relocations (`-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-q"`) - [x] Gather profile data using instrumented LLVM - [x] Apply profile to LLVM that has already been PGOfied - [x] Run with BOLT profiling on more benchmarks - [x] Decide on the order of optimization (PGO -> BOLT?) - [x] Decide how we should get `bolt` (currently we use the host `bolt`) - [x] Clean up The latest perf results can be found [here](https://github.com/rust-lang/rust/pull/94381#issuecomment-1258269440). The current CI build time with BOLT applied is around 1h 55 minutes.
2022-10-09Use BOLT in x64 dist CI to optimize LLVMJakub Beránek-0/+4
2022-10-07Add llvm-tblgen to rust-dev for cross-compilingJosh Stone-0/+1
2022-10-04Rollup merge of #102241 - jyn514:manifest-json-docs, r=Mark-SimulacrumMatthias Krüger-0/+1
Package `rust-docs-json` into nightly components (take 3) `dist` creates a `rust-docs-json.tar.xz` tarfile. But build-manifest expected it to be named `rust-docs-json-preview.tar.xz`. Change build-manifest to allow the name without the `-preview` suffix. I haven't actually tested this :( build-manifest is a pain to run locally.
2022-10-02re-add git-commit-hash file to tarballsdawnofmidnight-0/+1
rust-lang/rust#100557 removed the `git-commit-hash` file and replaced it with `git-commit-info`. However, build-manifest relies on the `git-commit-hash` file being present, so this adds it back.
2022-10-02Auto merge of #100557 - dawnofmidnight:tarball-commit-info, r=Mark-Simulacrumbors-3/+4
fix: use git-commit-info for version information Fixes #33286. Fixes #86587. This PR changes the current `git-commit-hash` file that `./x.py` dist puts in the `rustc-{version}-src.tar.{x,g}z` to contain the hash, the short hash, and the commit date from which the tarball was created, assuming git was available when it was. It uses this for reading the version so that rustc has all the appropriate metadata. # Testing Testing this is kind of a pain. I did it with something like ```sh ./x.py dist # ensure that `ignore-git` is `false` in config.toml cp ./build/dist/rustc-1.65.0-dev-src.tar.gz ../rustc-1.65.0-dev-src.tar.gz cd .. && tar -xzf rustc-1.65.0-dev-src && cd rustc-1.65.0-dev-src ./x.py build ``` Then, the output of `rustc -vV` with the stage1 compiler should have the `commit-hash` and `commit-date` fields filled, rather than be `unknown`. To be completely sure, you can use `rustc --sysroot` with the stdlib that the original `./x.py dist` made, which will require that the metadata matches.
2022-10-01fix: use git-commit-info for version informationdawnofmidnight-3/+4
This PR adds support for fetching version information from the `git-commit-info` file when building the compiler from a source tarball.
2022-10-01Package `rust-docs-json` into nightly components (take 3)Joshua Nelson-0/+1
`dist` creates a `rust-docs-json.tar.xz` tarfile. But build-manifest expected it to be named `rust-docs-json-preview.tar.xz`. Change build-manifest to allow the name without the `-preview` suffix. This also adds `rust-docs-json` to the `rust` component. I'm not quite sure why it exists, but rustup uses it to determine which components are available.
2022-09-29Auto merge of #101833 - jyn514:cross-compile-compiler-builtins, ↵bors-17/+15
r=Mark-Simulacrum Make the `c` feature for `compiler-builtins` an explicit opt-in Its build script doesn't support cross-compilation. I tried fixing it, but the cc crate itself doesn't appear to support cross-compiling to windows either unless you use the -gnu toolchain: ``` error occurred: Failed to find tool. Is `lib.exe` installed? ``` Fixes https://github.com/rust-lang/rust/issues/101172.
2022-09-28Make the `c` feature for `compiler-builtins` opt-in instead of inferredJoshua Nelson-17/+15
The build script for `compiler_builtins` doesn't support cross-compilation. I tried fixing it, but the cc crate itself doesn't appear to support cross-compiling to windows either unless you use the -gnu toolchain: ``` error occurred: Failed to find tool. Is `lib.exe` installed? ``` Rather than trying to fix it or special-case the platforms without bugs, make it opt-in instead of automatic.
2022-09-24Auto merge of #98483 - dvtkrlbs:bootstrap-dist, r=jyn514bors-1/+36
Distribute bootstrap in CI This pre-compiles bootstrap from source and adds it to the existing `rust-dev` component. There are two main goals here: 1. Make it faster to build rust from source, both the first time and incrementally 2. Make it easier to add non-python entrypoints, since they can call out to bootstrap directly rather than having to figure out the right flags to pre-compile it. This second part is still in a bit of flux, see the tracking issue below for more information. There are also several changes to make bootstrap able to run on a machine other than the one it was built (particularly around `config.src` and `config.out` detection). I (`@jyn514)` am slightly concerned these will regress unless tested - maybe we should add an automated test that runs bootstrap in a chroot or something? Unclear whether the effort is worth the test coverage. Helps with https://github.com/rust-lang/rust/issues/94829.
2022-09-24Copy `bootstrap.exe` on Windows, not `bootstrap`Joshua Nelson-1/+1
2022-09-24Rollup merge of #102176 - ojeda:add-llvm-dis-to-ci-llvm, r=Mark-SimulacrumMatthias Krüger-0/+1
Add `llvm-dis` to the set of tools in `ci-llvm` The LLVM disassembler is needed for the test introduced in https://github.com/rust-lang/rust/pull/97550. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-09-24Rollup merge of #102175 - oli-obk:miri_subtree_cleanup, r=jyn514Matthias Krüger-22/+22
Also require other subtrees to always build successfully r? ``@jyn514``
2022-09-23Add `llvm-dis` to the set of tools in `ci-llvm`Miguel Ojeda-0/+1
The LLVM disassembler is needed for the test introduced in https://github.com/rust-lang/rust/pull/97550. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-09-23Also require other subtrees to always build successfullyOli Scherer-22/+22
2022-09-23Rollup merge of #102042 - LukeMathWalker:add-rust-json-docs-to-rustup, ↵Matthias Krüger-10/+4
r=Mark-Simulacrum Distribute rust-docs-json via rustup. I am not 100% sure on how to treat `rust-json-docs` in `target_host_combination`. I went along with a similar strategy to the one used for `rust-docs`, but looking for guidance there.