about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2024-10-02Auto merge of #131117 - AvatarSenju:helpstring-fix, r=onur-ozkanbors-1/+1
Update helper docs display disable option Updated helper docs via configure.py to make it clearer that users can control options with enable and disable Fixing issue #129146
2024-10-01Rollup merge of #131108 - jieyouxu:revert-broken-pipe, r=onur-ozkanJubilee-4/+11
Revert #131060 "Drop conditionally applied cargo `-Zon-broken-pipe=kill` flags" In [#131059] we found out that `-Zon-broken-pipe=kill` is actually **load-bearing**[^1] for (at least) `rustc` and `rustdoc` to have the kill-process-on-broken-pipe behavior, e.g. `rustc --print=sysroot | false` will ICE and `rustdoc --print=sysroot | false` will panic on a broken pipe. This PR reverts 5a7058c5a542ec42d1fa9b524f7b4f7d6845d1e9 (reverts PR #131060) in favor of a future fix to *unconditionally* apply `-Zon-broken-pipe=kill` to tool builds and also not drop the `-Zon-broken-pipe=kill` flag for rustc binary builds. I could not figure out how to write a regression test for the `rustc --print=sysroot | false` behavior on Unix, so this is a plain revert for now. This revert will unfortunately reintroduce #130980 until we fix it again with the different approach. See more details at <https://github.com/rust-lang/rust/issues/131059#issuecomment-2385822033> and in the timeline below. ### Timeline of kill-process-on-broken-pipe behavior changes See [`unix_sigpipe` tracking issue #97889][#97889] for more context around unix sigpipe handling. - From the very beginning since 2014, Rust binaries by default use `sig_ign`. This meant that if output pipe is broken yet the program tries to use `println!` and such, there will be a broken pipe panic from std. This lead to ICEs from e.g. `rustc --help | false` [#34376]. - [#49606] mitigated [#34376] by adding an explicit signal handler to `rustc_driver` register a sigpipe handler with `SIG_DFL` which will cause the binary using `rustc_driver` to terminate if `rustc_driver::set_sigpipe_handler()` is called. `rustc`'s main binary wrapper uses `rustc_driver::set_sigpipe_handler()`, and so does `rustdoc`. - A more universal way to set sigpipe behavior for Unix was introduced as part of [#97889], i.e. `# [unix_sigpipe = "sig_dfl"]` attribute. - [#102587] migrated `rustc` to use `#[unix_sigpipe = "sig_dfl"]` instead of `rustc_driver::set_sigpipe_handler`. - [#103495] migrated `rustdoc` to use `#[unix_sigpipe = "sig_dfl"]` instead of `rustc_driver::set_sigpipe_handler`. `rustc_driver::set_sigpipe_handler` was removed. - Following concerns about sigpipe setting UI in [#97889], the UI for specifying sigpipe behavior was changed in [#124480] from `#[unix_sigpipe = "sig_dfl"]` attribute to the commmand line flag `-Zon-broken-pipe=kill`. - In the same PR, `#[unix_sigpipe = "sig_dfl"]` were removed from `rustc` and `rustdoc` main binary crate entry points in favor of the command line flag. Kill-process-on-broken-pipe behavior was preserved by adding `-Zon-broken-pipe=kill` for `rustdoc` tool build step and `rustc` during compile steps. - [#126934] added `-Zon-broken-pipe=kill` for tool builds *except* for cargo to help with some miri tests because at the time the PR was written, this would lead to a couple of cargo test failures. Conditionally setting `RUSTFLAGS` can lead to tool build invalidation, e.g. building `cargo` without `-Zon-broken-pipe=kill` but `clippy` with the flag can lead to invalidation of the tool build cache. This is not a problem at the time, because nothing (not even miri) tests built stage 1 cargo (all used initial cargo). - In [#130634] we found out that `run-make` tests like `compiler-builtins` needed stage 1 cargo, not just beta bootstrap cargo, because there can be changes that are present in stage 1 cargo but absent in beta cargo, which was blocking a beta backport. - [#130642] and later [#130739] now build stage 1 cargo. And as previously mentioned, since `-Zon-broken-pipe=kill` was specifically *not* set for cargo, this caused tool build cache invalidation meaning rebuilds of stage 1 even if nothing in source was changed due to differing `RUSTFLAGS` since `run-make` also builds `rustdoc` and such [#130980]. [#34376]: https://github.com/rust-lang/rust/issues/34376 [#49606]: https://github.com/rust-lang/rust/pull/49606 [#97889]: https://github.com/rust-lang/rust/issues/97889 [#102587]: https://github.com/rust-lang/rust/pull/102587 [#103495]: https://github.com/rust-lang/rust/pull/103495 [#124480]: https://github.com/rust-lang/rust/pull/124480 [#130634]: https://github.com/rust-lang/rust/issues/130634 [#130642]: https://github.com/rust-lang/rust/pull/130642 [#130739]: https://github.com/rust-lang/rust/pull/130739 [#130980]: https://github.com/rust-lang/rust/issues/130980 [#131059]: https://github.com/rust-lang/rust/issues/131059 [^1]: https://github.com/rust-lang/rust/issues/131059#issuecomment-2385822033 r? ``@onur-ozkan`` (or bootstrap)
2024-10-02Update helper docs display disable optionAnushrut-1/+1
Updated helper docs via configure.py to make it clearer that users can control options with enable and disable
2024-10-01Revert "Drop conditionally applied cargo `-Zon-broken-pipe=kill` flags"许杰友 Jieyou Xu (Joe)-4/+11
This reverts commit 5a7058c5a542ec42d1fa9b524f7b4f7d6845d1e9. In [#131059] we found out that `-Zon-broken-pipe=kill` is actually **load-bearing** [1] for (at least) `rustc` and `rustdoc` to have the kill-process-on-broken-pipe behavior, e.g. `rustc --print=sysroot | false` will ICE and `rustdoc --print=sysroot | false` will panic on a broken pipe. [#131059]: https://github.com/rust-lang/rust/issues/131059 [1]: https://github.com/rust-lang/rust/issues/131059#issuecomment-2385822033
2024-10-01add fixme to remove llvm option when minimal version is 19klensy-0/+1
2024-09-30Rollup merge of #129638 - nickrum:wasip2-net, r=alexcrichtonTrevor Gross-2/+7
Hook up std::net to wasi-libc on wasm32-wasip2 target One of the improvements of the `wasm32-wasip2` target over `wasm32-wasip1` is better support for networking. Right now, p2 is just re-using the `std::net` implementation from p1. This PR adds a new net module for p2 that makes use of net from `sys_common` and calls wasi-libc functions directly. There are currently a few limitations: - Duplicating a socket is not supported by WASIp2 (directly returns an error) - Peeking is not yet implemented in wasi-libc (we could let wasi-libc handle this, but I opted to directly return an error instead) - Vectored reads/writes are not supported by WASIp2 (the necessary functions are available in wasi-libc, but they call WASIp1 functions which do not support sockets, so I opted to directly return an error instead) - Getting/setting `TCP_NODELAY` is faked in wasi-libc (uses the fake implementation instead of returning an error) - Getting/setting `SO_LINGER` is not supported by WASIp2 (directly returns an error) - Setting `SO_REUSEADDR` is faked in wasi-libc (since this is done from `sys_common`, the fake implementation is used instead of returning an error) - Getting/setting `IPV6_V6ONLY` is not supported by WASIp2 and will always be set for IPv6 sockets (since this is done from `sys_common`, wasi-libc will return an error) - UDP broadcast/multicast is not supported by WASIp2 (since this is configured from `sys_common`, wasi-libc will return appropriate errors) - The `MSG_NOSIGNAL` send flag is a no-op because there are no signals in WASIp2 (since explicitly setting this flag would require a change to `sys_common` and the result would be exactly the same, I opted to not set it) Do those decisions make sense? While working on this PR, I noticed that there is a `std::os::wasi::net::TcpListenerExt` trait that adds a `sock_accept()` method to `std::net::TcpListener`. Now that WASIp2 supports standard accept, would it make sense to remove this? cc `@alexcrichton`
2024-09-30Auto merge of #131069 - matthiaskrgr:rollup-jg1icf9, r=matthiaskrgrbors-0/+5
Rollup of 5 pull requests Successful merges: - #131023 (Copy correct path to clipboard for modules/keywords/primitives) - #131035 (Preserve brackets around if-lets and skip while-lets) - #131038 (Fix `adt_const_params` leaking `{type error}` in error msg) - #131053 (Improve `--print=check-cfg` documentation) - #131056 (enable compiler fingerprint logs in verbose mode) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-30Rollup merge of #131056 - onur-ozkan:cargo-compiler-fingerprint, r=KobzolMatthias Krüger-0/+5
enable compiler fingerprint logs in verbose mode This provides very useful logs especially when debugging build cache-related stuff.
2024-09-30Auto merge of #130951 - tgross35:cargo-update-bootstrap, r=Kobzolbors-51/+51
Bump `cc` and run `cargo update` for bootstrap Bump `cc` to 1.1.22, which includes a caching fix. Also run `cargo update` which does a minor increment on a few dependencies.
2024-09-30Auto merge of #131063 - matthiaskrgr:rollup-hfs3fo1, r=matthiaskrgrbors-16/+9
Rollup of 4 pull requests Successful merges: - #130895 (make type-check-4 asm tests about non-const expressions) - #131057 (Reject leading unsafe in `cfg!(...)` and `--check-cfg`) - #131060 (Drop conditionally applied cargo `-Zon-broken-pipe=kill` flags to fix stage 1 cargo rebuilds) - #131061 (replace manual verbose checks with `Config::is_verbose`) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-30Rollup merge of #131061 - onur-ozkan:verbose-checks, r=KobzolMatthias Krüger-5/+5
replace manual verbose checks with `Config::is_verbose` self-explanatory
2024-09-30replace manual verbose checks with `Config::is_verbose`onur-ozkan-5/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-30Drop conditionally applied cargo `-Zon-broken-pipe=kill` flags许杰友 Jieyou Xu (Joe)-11/+4
These conditionally applied flags trigger rebuilds because they can invalidate previous cargo build cache.
2024-09-30enable compiler fingerprint logs in verbose modeonur-ozkan-0/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-29add has_enzyme/needs-enzyme to the test infraManuel Drehwald-0/+4
2024-09-29Rollup merge of #130383 - onur-ozkan:ignore-llvm-changes-on-ci-llvm-true, ↵Guillaume Gomez-13/+32
r=Mark-Simulacrum check if it's rust-lang/rust CI job in `llvm::is_ci_llvm_modified` Changes `llvm::is_ci_llvm_modified` to only work on rust-lang/rust managed CI.
2024-09-29in `llvm::is_ci_llvm_modified`, check if it's rust-lang/rust CI jobonur-ozkan-11/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-29Hook up std::net to wasi-libc on wasm32-wasip2 targetNicola Krumschmidt-2/+7
2024-09-28Rollup merge of #130918 - onur-ozkan:better-llvm-submodule-handling, r=KobzolMatthias Krüger-11/+19
simplify LLVM submodule handling Fixes #130906.
2024-09-27Bump `cc` and run `cargo update` for bootstrapTrevor Gross-51/+51
Bump `cc` to 1.1.22, which includes a caching fix. Also run `cargo update` which does a minor increment on a few dependencies.
2024-09-27Rollup merge of #130459 - onur-ozkan:#130449, r=albertlarsan68Matthias Krüger-3/+3
delete sub build directory "debug" to not delete the change-id file Fixes #130449
2024-09-27improve LLVM submodule handling logic in `llvm::prebuilt_llvm_config`onur-ozkan-11/+19
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-27Rollup merge of #130517 - bjorn3:update_ra_config, r=onur-ozkanGuillaume Gomez-0/+1
Add the library workspace to the suggested rust-analyzer config
2024-09-24Fix tool cargo being off-by-one from rustc staging许杰友 Jieyou Xu (Joe)-0/+8
Previously if you pass compiler stage 1 to `tool::Cargo`, it will build stage2 rustc and give you back a cargo built with stage2 rustc, which is not what we want. This commit adds a hack that chops off a stage from the compiler passed to `tool::Cargo`, meaning that we will get a cargo built with stage 1 compiler, avoiding unnecessary and incorrect build of stage2 rustc and the cargo built by that.
2024-09-24Pass bootstrap cargo when `--stage 0` and `COMPILETST_FORCE_STAGE0`许杰友 Jieyou Xu (Joe)-4/+9
And stop passing `BOOTSTRAP_CARGO` as an env var, instead the provided cargo should go through `--cargo-path.`
2024-09-23Auto merge of #130620 - onur-ozkan:update-make-prepare, r=Kobzolbors-22/+14
remove workaround for make prepare and use dry-run build instead Removes an annoying hard-coded logic. try-job: x86_64-msvc
2024-09-23invoke cmake check with `run_always`onur-ozkan-1/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-23Rollup merge of #130536 - cuviper:rustbook-dylib-path, r=Mark-SimulacrumJubilee-9/+11
bootstrap: Set the dylib path when building books with rustdoc The library path is needed when the toolchain has been configured with `[rust] rpath = false`. Otherwise, building the reference book will get an error when it tries to run rustdoc, like: rustdoc: error while loading shared libraries: librustc_driver-2ec457c3b8826b72.so
2024-09-23check if the LLVM submodule is fetched in `is_ci_llvm_modified`onur-ozkan-3/+11
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-393/+307
2024-09-21Rollup merge of #130648 - onur-ozkan:enzyme-linking, r=KobzolJubilee-6/+4
move enzyme flags from general cargo to rustc-specific cargo Resolves #130637.
2024-09-21move enzyme flags from general cargo to rustc-specific cargoonur-ozkan-6/+4
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-20Pass the current cargo to `run-make` testsJosh Stone-0/+5
A couple tests were using `BOOTSTRAP_CARGO` with `-Zbuild-std`, but that stage0 cargo might not always be in sync with in-tree changes. In particular, those tests started failing on the beta branch because the older cargo couldn't find the library `Cargo.lock`, and then couldn't build the latest version of `compiler_builtins` that had nightly changes.
2024-09-20skip `FileCheck` check when running in dry-run modeonur-ozkan-11/+11
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-20remove workaround for make prepare and use dry-run build insteadonur-ozkan-10/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-19Register tool docs for compiletest许杰友 Jieyou Xu (Joe)-0/+8
2024-09-19Auto merge of #130529 - onur-ozkan:better-ci-llvm-default, r=Kobzolbors-7/+11
change `download-ci-llvm` default from `if-unchanged` to `true` Since https://github.com/rust-lang/rust/pull/129473 and https://github.com/rust-lang/rust/pull/130202, using `download-ci-llvm=true` is now the better default and it also fixes #130515.
2024-09-19add change-tracker for new download-ci-llvm defaultonur-ozkan-0/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-19change download-ci-llvm default from "if-unchanged" to trueonur-ozkan-7/+6
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-19Auto merge of #130406 - arttet:master, r=onur-ozkanbors-3/+12
Bump cc dependency * The [issue](https://github.com/rust-lang/rust/issues/130231) was fixed in the [PR](https://github.com/rust-lang/cc-rs/pull/1207) * The build artifacts of arm64e-apple-darwin can be found [here](https://github.com/arttet/rust-compiler-builder/actions/runs/10902308425)
2024-09-18bootstrap: Set the dylib path when building books with rustdocJosh Stone-9/+11
The library path is needed when the toolchain has been configured with `[rust] rpath = false`. Otherwise, building the reference book will get an error when it tries to run rustdoc, like: rustdoc: error while loading shared libraries: librustc_driver-2ec457c3b8826b72.so
2024-09-18Update the minimum external LLVM to 18Josh Stone-2/+2
2024-09-18Bump cc dependencyArtyom Tetyukhin-3/+12
2024-09-18Add the library workspace to the suggested rust-analyzer configbjorn3-0/+1
2024-09-17delete sub directory "debug" to not delete the change-id fileonur-ozkan-3/+3
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-15Rollup merge of #130420 - jieyouxu:build_helpers_docs, r=onur-ozkanJubilee-0/+9
Register tool docs for `src/tools/build_helper` Fixes #130355.
2024-09-15Rollup merge of #130336 - onur-ozkan:simple-improvement, r=albertlarsan68Jubilee-5/+1
simplify `Build::update_existing_submodule` `Build::update_existing_submodule` is already doing the same thing..
2024-09-16bootstrap: register tool docs for src/tools/build_helper许杰友 Jieyou Xu (Joe)-0/+9
2024-09-15add change entry for `dist.vendor`onur-ozkan-0/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-15make dist vendoring configurableonur-ozkan-6/+10
Signed-off-by: onur-ozkan <work@onurozkan.dev>