about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2024-10-05Rollup merge of #130555 - hegza:rv32e, r=workingjubileeMatthias Krüger-0/+3
Initial support for riscv32{e|em|emc}_unknown_none_elf We have a research prototype of an RV32EMC target and have been successfully running the e, em, emc programs on it. I'm hoping upstreaming this configuration would make the target maintenance slightly easier. Configuration is based on the respective {i, im, imc} variants. As defined in RISC-V Unprivileged Spec. 20191213, the only change in RVE wrt. RVI is to reduce the number of integer registers to 16 (x0-x15), which also implies - 2 callee saved registers instead of 12 - 32-bit / 4-byte stack alignment instead of 128 bits / 16 bytes My initial presumption is that this will not impact how the target is defined for the compiler but only becomes relevant at the runtime level. I am willing to investigate, though. EDIT: LLVM is now told about the presumed 32-bit stack alignment. `@Disasm` `@romancardenas`
2024-10-05Auto merge of #131188 - Kobzol:remove-libstd-so-from-sysroot, r=onur-ozkanbors-2/+17
Do not copy libstd dynamic library to sysroot Since https://github.com/rust-lang/rust/pull/122362, rustc links statically to libstd.[so|dll]. Which means that the libstd.[so|dll] file no longer has to be in the rustc sysroot. However, we are currently still shipping this file, in every new release of Rust, for no reason, it's just wasted bytes. This PR removes the dynamic library file from the built sysroot. However, it is not yet performed on Windows, because stage0 incremental tests start failing there (see description of the issue [here](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Failing.20incr.20tests.20on.20Windows.20when.20std.2Edll.20is.20missing/near/474507064)). This is an extended version of https://github.com/rust-lang/rust/pull/128986. CC `@Zoxc`
2024-10-05Work around the stage0 sanity checkHenri Lunnikivi-0/+3
Add rv32e-targets to 'stage0 missing targets'. This prevents the error "no such target exists in the target list".
2024-10-05remove outdated contribution directiononur-ozkan-4/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-04Avoid dynamic linking to libstd in `command-current-dir` testJakub Beránek-2/+2
2024-10-04Disable -Zdual-proc-macros if the target doesn't support proc-macrosbjorn3-3/+17
2024-10-03bootstrap: Consolidate editor LSP setupKajetan Puchalski-61/+76
Consolidate LSP setup for different editors into one `./x setup editor`.
2024-10-03Do not include `libstd.so` in sysroot when we statically link to libstdJakub Beránek-2/+17
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-01bootstrap: Add support for ./x setup vimKajetan Puchalski-13/+29
2024-10-01bootstrap: Add support for ./x setup helixKajetan Puchalski-2/+12
2024-10-01bootstrap: Add support for ./x setup emacsKajetan Puchalski-63/+135
Add support for automatically setting up the recommended LSP config for Emacs. Additionally, refactor setup.rs to make it easier to add support for more editors in the future.
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-30Fix std_detect linksismailarilik-0/+4
Fixes #96506
2024-09-30Update doc.rsBinlogo-1/+1
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-29make `Step` doc-comments more clearonur-ozkan-18/+22
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-26Do not output () on empty descriptionCameron Pickett-3/+5
2024-09-26Couple of changes to make it easier to compile rustc for wasmbjorn3-0/+2
This is a subset of the patches I have on my rust fork to compile rustc for wasm32-wasip1.
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>