summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2023-05-27Rollup merge of #111936 - ferrocene:pa-test-suite-metadata, r=jyn514Guillaume Gomez-24/+144
Include test suite metadata in the build metrics This PR enhances the build metadata to include structured information about the test suites being executed, allowing external tools consuming the metadata to understand what was being tested. The included metadata is: * Target triple * Host triple * Stage number * For compiletest tests: * Suite name * Mode * Comparing mode * For crate tests: * List of crate names This is implemented by replacing the `test` JSON node with a new `test_suite` node, which contains the metadata and the list of tests. This change also improves the handling of multiple test suites executed in the same step (for example in compiletest tests with a compare mode), as the multiple test suite executions will now be tracked in separate `test_suite` nodes. This included a breaking change in the build metrics metadata format. To better handle this, in the second commit this PR introduces the `metadata_version` top-level field. The old version is considered to be `0`, while the new one `1`. Bootstrap will also gracefully handle existing metadata of a different version. r? `@jyn514`
2023-05-27Auto merge of #111348 - ozkanonur:remove-hardcoded-rustdoc-flags, ↵bors-89/+31
r=albertlarsan68,oli-obk new tool `rustdoc-gui-test` Implements new tool `rustdoc-gui-test` that allows using compiletest headers for `rustdoc-gui` tests.
2023-05-27Rollup merge of #111977 - jyn514:doc-errors, r=est31Matthias Krüger-2/+2
Make errors from `x doc` less verbose before: ``` error: could not document `bootstrap` Caused by: process didn't exit successfully: `/home/jyn/src/rust/build/bootstrap/debug/rustdoc ... --crate-version '1.71.0 (eb9da7bfa 2023-05-25) (a long description goes here)' --document-private-items --enable-index-page --show-type-layout --generate-link-to-definition -Zunstable-options` (exit status: 1) ``` after: ``` error: could not document `bootstrap` Caused by: process didn't exit successfully: `/home/jyn/src/rust/build/bootstrap/debug/rustdoc ... --crate-version '1.71.0 (eb9da7bfa 2023-05-25) (a long description goes here)' --document-private-items --enable-index-page --show-type-layout --generate-link-to-definition -Zunstable-options` (exit status: 1) ```
2023-05-27Rollup merge of #111976 - jyn514:doc-bootstrap, r=ozkanonurMatthias Krüger-4/+12
Generate docs for bootstrap itself This verifies the intra-doc links are correct, and hopefully makes things easier for new contributors. Note that this will conflict with https://github.com/rust-lang/rust/pull/111955, i'm pretty sure i typo-ed some of the intra-doc links lol
2023-05-26add reasoning for introducing a metrics format versionPietro Albini-3/+15
2023-05-26rename metadata_version to format_versionPietro Albini-10/+9
The new name is more accurate.
2023-05-26Make errors from `x doc` less verbosejyn-2/+2
before: ``` error: could not document `bootstrap` Caused by: process didn't exit successfully: `/home/jyn/src/rust/build/bootstrap/debug/rustdoc ... --crate-version '1.71.0 (eb9da7bfa 2023-05-25) (a long description goes here)' --document-private-items --enable-index-page --show-type-layout --generate-link-to-definition -Zunstable-options` (exit status: 1) ``` after: ``` error: could not document `bootstrap` Caused by: process didn't exit successfully: `/home/jyn/src/rust/build/bootstrap/debug/rustdoc ... --crate-version '1.71.0 (eb9da7bfa 2023-05-25) (a long description goes here)' --document-private-items --enable-index-page --show-type-layout --generate-link-to-definition -Zunstable-options` (exit status: 1) ```
2023-05-26Auto merge of #111562 - clubby789:speedup-bootstrap-py, r=jyn514bors-49/+44
Improve startup time of bootstrap ~~If the user has a `build/host` symlink set up, we can determine the target triple by reading it rather than invoking rustc. This significantly reduces startup time of bootstrap once any kind of build has been done~~ New approach explained below ``` ➜ hyperfine -p 'git checkout -q master' -N './x.py -h' -r 50 Benchmark 1: ./x.py -h Time (mean ± σ): 140.7 ms ± 2.6 ms [User: 99.9 ms, System: 39.3 ms] Range (min … max): 136.8 ms … 149.6 ms 50 runs ➜ rust git:(master) hyperfine -p 'git checkout -q speedup-bootstrap-py' -N './x.py -h' -r 50 Benchmark 1: ./x.py -h Time (mean ± σ): 95.2 ms ± 1.5 ms [User: 67.7 ms, System: 26.7 ms] Range (min … max): 92.9 ms … 99.6 ms 50 runs ``` Also a small microoptimisation in using string splitting rather than regex when reading toml, which saves a few more milliseconds (2-5 testing locally), but less important. Profiling shows the remaining runtime is around half setting up the Python runtime, and the vast majority of the remaining time is spent in subprocess building and running bootstrap itself, so probably can't be improved much further.
2023-05-26Improve startup time for bootstrap.pyclubby789-49/+44
2023-05-26address review feedbackPietro Albini-7/+5
2023-05-25Generate docs for bootstrap itselfjyn-4/+12
This verifies the intra-doc links are correct, and hopefully makes things easier for new contributors.
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-25introduce build metrics version numbers to handle breaking changesPietro Albini-2/+31
2023-05-25include test suite metadata in build metricsPietro Albini-22/+104
2023-05-25fix: :bug: etc/bash_complettion -> src/etc/... to avoid copy errorekusiadadus-1/+5
chore: :art: format dist.rs
2023-05-24Auto merge of #111566 - clubby789:bootstrap-override-config, r=ozkanonurbors-32/+198
Override config.toml options from command line https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/Running.20tests.20on.20precompiled.20rustc/near/357763280 cc `@jyn514`
2023-05-23Promote loongarch64-unknown-linux-gnu to Tier 2 with host toolsWANG Rui-0/+1
MCP: https://github.com/rust-lang/compiler-team/issues/518
2023-05-21Render test messages from bootstrapEric Huss-2/+7
2023-05-21Rollup merge of #111809 - DrMeepster:patch-1, r=jyn514Matthias Krüger-0/+2
Unset MIRI_BLESS for mir-opt-level 4 miri tests When running `x.py test src/tools/miri --bless`, the 2nd test run (with mir-opt-level 4) crashes because it disables ui checking, which is incompatible with blessing. This PR fixes that by not trying to bless that run.
2023-05-20unset MIRI_BLESS for mir-opt-level 4 miri testsDrMeepster-0/+2
2023-05-20bootstrap: add test cases for beta revision extractionliushuyu-0/+16
2023-05-20Read beta version from the version file ...liushuyu-6/+27
... if building from a source tarball
2023-05-20Auto merge of #111798 - GuillaumeGomez:rollup-t3bus8o, r=GuillaumeGomezbors-2/+2
Rollup of 5 pull requests Successful merges: - #111450 (Use `OpaqueTypeKey` in query response) - #111726 (Migrate GUI colors test to original CSS color format) - #111746 (Merge some query impl modules into one) - #111765 (Migrate GUI colors test to original CSS color format) - #111771 (add `--remote-time` flag to curl for bootstrap) r? `@ghost` `@rustbot` modify labels: rollup
2023-05-20Rollup merge of #111771 - liushuyu:ubuntu/rep-stage0, r=ozkanonurGuillaume Gomez-2/+2
add `--remote-time` flag to curl for bootstrap This pull request sets the timestamp of the downloaded stage0 binary according to the server-reported timestamp (if possible). This allows make_orig-dl_tarball.sh to be more reproducible on the filesystem.
2023-05-20Auto merge of #111413 - workingjubilee:bump-object-0-31-1, r=MarkSimulacrumbors-3/+3
Bump object and thorin-dwp Required to fix watchOS breakage.
2023-05-20implement and use tools/rustdoc-gui-test in bootstrapozkanonur-89/+31
2023-05-20Rollup merge of #111606 - jyn514:nightly-diagnostics, r=lcnrDylan DPC-1/+0
very minor cleanups - add `must_use` to `early_error_no_abort` this was already being used at its only callsite, but this ensures that new code remembers to use it if it's called in the future. found this while investigating https://github.com/rust-lang/rust/issues/110090. - remove outdated and incorrect comment in `builder.rs`. `doc_rust_lang_org_channel` doesn't exist in rustdoc, it gets it from an env var instead: https://github.com/rust-lang/rust/blob/b275d2c30b6e88cc48747f349f7137076d450658/src/librustdoc/clean/utils.rs#L569-L573
2023-05-19Set the timestamp of downloaded stage0 files ...Ximin Luo-2/+2
... using server-reported timestamp. This allows us to track changes to the downloaded artifact more easily and in a more reproducible manner. Co-authored-by: Zixing Liu <zixing.liu@canonical.com>
2023-05-19Override config.toml options from command lineclubby789-32/+198
2023-05-18very minor cleanupsjyn-1/+0
- add `must_use` to `early_error_no_abort` this was already being used at its only callsite, but this ensures that new code remembers to use it if it's called in the future. - remove outdated and incorrect comment in `builder.rs`. `doc_rust_lang_org_channel` doesn't exist in rustdoc, it gets it from an env var instead.
2023-05-18Rollup merge of #111685 - Kobzol:bootstrap-typo, r=clubby789Dylan DPC-1/+1
Fix typo in bootstrap command description Unless `duild` is some clever name for `dist build`, this is probably a typo.
2023-05-18Rollup merge of #111160 - chbaker0:update-serde, r=Mark-SimulacrumDylan DPC-8/+8
Update serde in workspace and non-synced dependencies The main workspace, bootstrap, cargo, miri, and rust-analyzer all lock serde to different versions. It's preferable to share the same version where possible, so update it. Rustfmt is synced from another repository and has its own Cargo.lock, but since it's added to the overall workspace it should respect the version here. Cargo is already at the latest version. Miri and rust-analyzer would require upstream updates.
2023-05-17Fix typo in bootstrap command descriptionJakub Beránek-1/+1
2023-05-14comment feedbackyukang-1/+2
2023-05-14fixyukang-2/+2
2023-05-14skip rustc version check in dry_runyukang-0/+4
2023-05-14Make sure the build.rustc version is either the same or 1 apartyukang-0/+42
2023-05-14Auto merge of #111388 - clubby789:clap-complete, r=jyn514bors-15/+101
Generate shell completions for bootstrap with Clap Now that #110693 has been merged, we can look at generating shell completions for x.py with `clap_complete`. Leaving this as draft for now as I'm not sure of the best way to integration the completion generator. Additionally, the generated completions for zsh are completely broken (will need to be resolved upstream, it doesn't seem to handle subcommands + global arguments well). I don't have Fish installed and would be interested to know how well completions work there. Alternative to #107827
2023-05-12run miri tests with MIR opts in rustc CIRalf Jung-2/+19
2023-05-10Bump object and thorin-dwpJubilee Young-3/+3
object -> 0.31.1 thorin-dwp -> 0.6.0 Required to fix watchOS breakage.
2023-05-10Generate shell completions for bootstrap with Clapclubby789-15/+101
2023-05-09Rollup merge of #111242 - wangkirin:support_rpath_independent_config, ↵Matthias Krüger-1/+9
r=albertlarsan68 support set `rpath` option for each target independently Currently the `rpath` option is a global config and it's effect on all targets. But sometimes when developers edit the rustc code and try to release rust toolchains themselves, they may not want to add `rpath` in all targets to avoid dynamically linked shared object library privilege escalation attack. This PR supports set `rpath` option for each target independently . Common developers are not aware of the existence of this configuration option and do not affect the existing development process. This configuration option takes effect only after developers explicitly sets . r? ``@albertlarsan68``
2023-05-09Auto merge of #110152 - ChrisDenton:windows-sys, r=thomccbors-0/+24
Start using `windows sys` for Windows FFI bindings in std Switch to using windows-sys for FFI. In order to avoid some currently contentious issues, this uses windows-bindgen to generate a smaller set of bindings instead of using the full crate. Unlike the windows-sys crate, the generated bindings uses `*mut c_void` for handle types instead of `isize`. This to sidestep opsem concerns about mixing pointer types and integers between languages. Note that `SOCKET` remains defined as an integer but instead of being a usize, it's changed to fit the [standard library definition](https://github.com/rust-lang/rust/blob/a41fc00eaf352541008965fec0dee811e44373b3/library/std/src/os/windows/raw.rs#L12-L16): ```rust #[cfg(target_pointer_width = "32")] pub type SOCKET = u32; #[cfg(target_pointer_width = "64")] pub type SOCKET = u64; ``` The generated bindings also customizes the `#[link]` imports. I hope to switch to using raw-dylib but I don't want to tie that too closely with the switch to windows-sys. --- Changes outside of the bindings are, for the most part, fairly minimal (e.g. some differences in `*mut` vs. `*const` or a few types differ). One issue is that our own bindings sometimes mix in higher level types, like `BorrowedHandle`. This is pretty adhoc though.
2023-05-08Auto merge of #111342 - Dylan-DPC:rollup-b5p6wzy, r=Dylan-DPCbors-4/+14
Rollup of 7 pull requests Successful merges: - #110297 (Make `(try_)subst_and_normalize_erasing_regions` take `EarlyBinder`) - #110827 (Fix lifetime suggestion for type aliases with objects in them) - #111022 (Use smaller ints for bitflags) - #111056 (Fix some suggestions where a `Box<T>` is expected.) - #111262 (Further normalize msvc-non-utf8-ouput) - #111265 (Make generics_of has_self on RPITITs delegate to the opaque) - #111323 (Give a more helpful error when running the rustc shim directly) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-05-08Auto merge of #106621 - ozkanonur:enable-elided-lifetimes-for-doctests, ↵bors-0/+9
r=Mark-Simulacrum enable `rust_2018_idioms` lint group for doctests With this change, `rust_2018_idioms` lint group will be enabled for compiler/libstd doctests. Resolves #106086 Resolves #99144 Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-05-08supplement CHANGELOG for add rpath in target sectionWang Qilin-0/+1
2023-05-07Update serde in workspace and non-synced dependenciesCollin Baker-8/+8
The main workspace, bootstrap, cargo, miri, and rust-analyzer all lock serde to different versions. It's preferable to share the same version where possible, so update it. Rustfmt is synced from another repository and has its own Cargo.lock, but since it's added to the overall workspace it should respect the version here. Cargo is already at the latest version. Miri and rust-analyzer would require upstream updates.
2023-05-07Give a more helpful error when running the rustc shim directlyjyn-4/+14
cc https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/Building.20.60coretests.60.20by.20hand
2023-05-07Auto merge of #110693 - clubby789:x-clap-take-2, r=Mark-Simulacrumbors-730/+481
Migrate bootstrap to Clap-based argument parsing Supercedes #108083 I chose to re-do the work rather than rebase the onto the large changes since the original PR. If it's preferred I can instead force-push the original PR to this version. cc `@jyn514` `@albertlarsan68`
2023-05-06Migrate bootstrap to Clap-based argumentsclubby789-730/+481