about summary refs log tree commit diff
path: root/src/bootstrap/dist.rs
AgeCommit message (Collapse)AuthorLines
2023-10-17move bootstrap core implementation to bootstrap/src/core moduleonur-ozkan-2279/+0
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-16Rollup merge of #116430 - onur-ozkan:vendoring-in-tarball-sources, r=clubby789Matthias Krüger-5/+9
vendoring in tarball sources fixes #94782
2023-10-08linker: Remove `-Zgcc-ld` optionVadim Petrochenkov-6/+7
It is subsumed by `-Clinker-flavor=*-lld-cc -Clink-self-contained=+linker` options now
2023-10-06remove the use of `fn update_submodule` on rust-analyzeronur-ozkan-1/+0
We don't need to run `fn update_submodule` on rust-analyzer as it's no longer a submodule. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-04vendor distribution on the tarball sourcesonur-ozkan-5/+10
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-07-31Pass BOLT profile to bootstrap to be included in the reproducible artifacts ↵Jakub Beránek-2/+2
archive
2023-07-31Remove BOLT from bootstrapJakub Beránek-126/+1
2023-07-30bootstrap: inline format!() argsMatthias Krüger-7/+7
2023-07-25Remove credential providers from bootstrapArlo Siemsen-7/+0
since they are now built-in to the Cargo binary
2023-07-14Don't checkout the LLVM submodule in `x dist --dry-run`jyn-1/+3
We don't actually need it and it's quite slow.
2023-07-14bootstrap: update defaults for `compiler` and `library` aliasesLukas Markeffsky-1/+6
2023-07-12Revert "fix: :bug: etc/bash_complettion -> src/etc/... to avoid copy error"ekusiadadus-5/+1
This reverts commit 08ce68b6a6bad360e9c3611ad60cf6598401f878.
2023-07-01msvc dist extended: rust-analyzer is optionalRémy Rakic-19/+20
The windows tarballs and installers expect rust-analyzer to be present, but it's not always the case. For example, in try builds.
2023-07-01msvc dist extended: clippy is optionalRémy Rakic-22/+29
The windows tarballs and installers expect clippy to be present, but it's not always the case. For example, in try builds.
2023-06-14yet another dry run fixPietro Albini-0/+4
2023-05-31Auto merge of #111076 - ↵bors-0/+3
notriddle:notriddle/silence-private-dep-trait-impl-suggestions, r=cjgillot diagnostics: exclude indirect private deps from trait impl suggest Fixes #88696
2023-05-29Switch doc::{Std, Rustc} to `crate_or_deps`jyn-5/+1
Previously they were using `all_krates` and various hacks to determine which crates to document. Switch them to `crate_or_deps` so `ShouldRun` tells them which crate to document instead of having to guess. This also makes a few other refactors: - Remove the now unused `all_krates`; new code should only use `crate_or_deps`. - Add tests for documenting Std - Remove the unnecessary `run_cargo_rustdoc_for` closure so that we only run cargo once - Give a more helpful error message when documenting a no_std target - Use `builder.msg` in the Steps instead of `builder.info`
2023-05-25bootstrap: use RUSTC_BOOTSTRAP to vendor sourcesMichael Howell-0/+3
2023-05-25Auto merge of #110906 - ekusiadadus:ekusiadadus/fix-bash-complete-etc, ↵bors-1/+5
r=albertlarsan68 fix: :bug: etc/bash_complettion -> src/etc/... to avoid copy error ## why I got an error on executing `./x.py build && ./x.py install`. Found creating some folder in `/etc/bash_completion.d/`, It appears to be incorrect to attempt to create a folder in `/etc/bash_completion.d/`, as this proccess requires `sudo`. Fixes #111653 ``` Uplifting rustc (stage1 -> stage3) Building tool cargo (stage2 -> stage3, x86_64-unknown-linux-gnu) Finished release [optimized] target(s) in 0.16s Building tool cargo-credential-1password (stage2 -> stage3, x86_64-unknown-linux-gnu) Finished release [optimized] target(s) in 0.06s Dist cargo-1.71.0-dev-x86_64-unknown-linux-gnu finished in 10.700 seconds Installing stage2 cargo (x86_64-unknown-linux-gnu) install: uninstalling component 'cargo' install: creating uninstall script at /home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/uninstall.sh install: installing component 'cargo' /home/ekusiadadus/dev/rust/rust/build/tmp/tarball/cargo/x86_64-unknown-linux-gnu/cargo-1.71.0-dev-x86_64-unknown-linux-gnu/install.sh: 310: cd: can't cd to /etc/bash_completion.d cp: cannot create regular file '/cargo': Permission denied chmod: cannot access '/cargo': No such file or directory install: error: file creation failed. see logs at '/home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/install.log' Build completed unsuccessfully in 0:01:11 ``` Error Log ``` install: uninstalling component 'cargo' install: removing file /home/ekusiadadus/.rustup/toolchains/dev/bin/cargo $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/bin/cargo install: removing file /home/ekusiadadus/.rustup/toolchains/dev/libexec/cargo-credential-1password $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/libexec/cargo-credential-1password install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/doc/rust/LICENSE-APACHE $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/doc/rust/LICENSE-APACHE install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/doc/rust/LICENSE-MIT $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/doc/rust/LICENSE-MIT install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/doc/rust/LICENSE-THIRD-PARTY $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/doc/rust/LICENSE-THIRD-PARTY install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/doc/rust/README.md $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/doc/rust/README.md install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-add.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-add.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-bench.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-bench.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-build.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-build.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-check.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-check.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-clean.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-clean.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-doc.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-doc.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-fetch.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-fetch.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-fix.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-fix.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-generate-lockfile.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-generate-lockfile.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-help.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-help.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-init.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-init.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-install.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-install.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-locate-project.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-locate-project.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-login.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-login.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-logout.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-logout.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-metadata.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-metadata.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-new.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-new.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-owner.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-owner.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-package.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-package.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-pkgid.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-pkgid.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-publish.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-publish.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-remove.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-remove.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-report.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-report.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-run.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-run.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-rustc.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-rustc.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-rustdoc.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-rustdoc.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-search.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-search.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-test.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-test.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-tree.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-tree.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-uninstall.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-uninstall.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-update.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-update.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-vendor.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-vendor.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-verify-project.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-verify-project.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-version.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-version.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-yank.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo-yank.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo.1 $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/man/man1/cargo.1 install: removing file /home/ekusiadadus/.rustup/toolchains/dev/share/zsh/site-functions/_cargo $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/share/zsh/site-functions/_cargo install: removing file /home/ekusiadadus/.rustup/toolchains/dev/src/etc/bash_completion.d/cargo $ rm -f /home/ekusiadadus/.rustup/toolchains/dev/src/etc/bash_completion.d/cargo install: removing component manifest /home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/manifest-cargo $ rm /home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/manifest-cargo $ echo "rust-analyzer-preview rustfmt-preview rust-demangler-preview clippy-preview miri-preview llvm-tools-preview rust-src rustc rust-docs rust-std-x86_64-unknown-linux-gnu" > "/home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/components" $ umask 022 && mkdir -p "/home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib" $ echo "3" > "/home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/rust-installer-version" install: creating uninstall script at /home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/uninstall.sh $ cp /home/ekusiadadus/dev/rust/rust/build/tmp/tarball/cargo/x86_64-unknown-linux-gnu/cargo-1.71.0-dev-x86_64-unknown-linux-gnu/install.sh /home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/uninstall.sh install: installing component 'cargo' $ echo "cargo" >> "/home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/components" $ umask 022 && mkdir -p "/home/ekusiadadus/.rustup/toolchains/dev/bin" install: copying file /home/ekusiadadus/.rustup/toolchains/dev/bin/cargo $ cp /home/ekusiadadus/dev/rust/rust/build/tmp/tarball/cargo/x86_64-unknown-linux-gnu/cargo-1.71.0-dev-x86_64-unknown-linux-gnu/cargo/bin/cargo /home/ekusiadadus/.rustup/toolchains/dev/bin/cargo $ chmod 755 /home/ekusiadadus/.rustup/toolchains/dev/bin/cargo $ echo "file:/home/ekusiadadus/.rustup/toolchains/dev/bin/cargo" >> "/home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/manifest-cargo" $ umask 022 && mkdir -p "/etc/bash_completion.d" install: copying file /cargo $ cp /home/ekusiadadus/dev/rust/rust/build/tmp/tarball/cargo/x86_64-unknown-linux-gnu/cargo-1.71.0-dev-x86_64-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo /cargo $ chmod 644 /cargo install: error: file creation failed. see logs at '/home/ekusiadadus/.rustup/toolchains/dev/lib/rustlib/install.log' ```
2023-05-25fix: :bug: etc/bash_complettion -> src/etc/... to avoid copy errorekusiadadus-1/+5
chore: :art: format dist.rs
2023-05-05Rollup merge of #111187 - krasimirgg:llvm-runtimes, r=jyn514Yuki Okushi-0/+2
bootstrap: add llvm-project/runtimes to the sources This is needed to build libunwind for LLVM 16: https://discourse.llvm.org/t/runtimes-removed-support-for-llvm-enable-projects-in-libcxx-libcxxabi-and-libunwind/65707 Zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/missing.20llvm-project.2Fruntimes.20in.20beta.20srcs Checked by running `x.py dist` and verifying the produced source archive (build/dist/rustc-1.71.0-dev-src.tar.gz) contains the new directory.
2023-05-04bootstrap: 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-05-04bootstrap: add llvm-project/runtimes to the sourcesKrasimir Georgiev-0/+2
This is needed to build libunwind for LLVM 16: https://discourse.llvm.org/t/runtimes-removed-support-for-llvm-enable-projects-in-libcxx-libcxxabi-and-libunwind/65707 Doesn't work: with this, running `python3 x.py dist` produces a tar archive that still doesn't contain the runtimes subdirectory?
2023-04-18Don't special-case download-rustc in `maybe_install_llvm`jyn-14/+0
This is no longer necessary now that the llvm in `rust-dev` matches the one in `rustc`.
2023-04-16chore: allow `cargo` to have its own workspaceWeihang Lo-0/+3
This also * bumps cargo to the latest in rust-lang/cargo. * adds 0BSD to allowed list of licenses Co-authored-by: Scott Schafer <schaferjscott@gmail.com> Co-authored-by: Eric Huss <eric@huss.org>
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.