about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2023-11-17Rollup merge of #117338 - workingjubilee:asmjs-meets-thanatos, r=b-naberMatthias Krüger-1/+1
Remove asmjs Fulfills [MCP 668](https://github.com/rust-lang/compiler-team/issues/668). `asmjs-unknown-emscripten` does not work as-specified, and lacks essential upstream support for generating asm.js, so it should not exist at all.
2023-11-17Rollup merge of #117850 - onur-ozkan:fix-116538, r=Mark-SimulacrumTakayuki Maeda-4/+10
bootstrap: simplify setting unstable-options for tools Previously, we unconditionally(instead of `if path == "src/tools/clippy" || ..`) set this (to prevent recompiling tools between `x check $tool` and '` check $another_tool` executions) specifically for tools in the `x check` step. This PR relocates that logic to `fn prepare_tool_cargo`, making it step-agnostic. Fixes #116538 Fixes #117983
2023-11-16bootstrap: only show PGO warnings when verboseJosh Stone-1/+3
Building rustc with `--rust-profile-use` is currently dumping a lot of warnings of "no profile data available for function" from `rustc_smir` and `stable_mir`. These simply aren't exercised by the current profile- gathering steps, but that's to be expected for new or experimental functionality. I think for most people, these warnings will be just noise, so it makes sense to only have them in verbose builds.
2023-11-15Bump cfg(bootstrap)sMark Rousskov-29/+10
2023-11-14Auto merge of #117701 - lnicola:sync-from-ra, r=onur-ozkan,HKalbasibors-8/+7
Subtree update of `rust-analyzer` r? `@HKalbasi`
2023-11-13doc: add release notes to standalone doc bundleMichael Howell-1/+103
This is a workaround for #101714 on top of being a useful addition in its own right. It is intended to change the "canonical URL" for viewing the release notes from GitHub, which is relatively slow, to a pre-rendered HTML file that loads from the same CDN as the standard library docs. It also means you get a copy of the release notes when installing the rust-docs with rustup.
2023-11-13Try Mode::ToolRustcLaurențiu Nicola-6/+6
2023-11-13set CFG_OMIT_GIT_HASH=1 during builds when omit-git-hash is enabledPietro Albini-0/+7
2023-11-12Cranelift isn't available on non-nightly channelsMark Rousskov-4/+1
2023-11-12bootstrap: simplify setting unstable-options for toolsonur-ozkan-4/+10
We unconditionally set this to avoid recompiling tools between `x check $tool` and `x test $tool` executions. See https://github.com/rust-lang/rust/issues/116538 for more information. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-12write .last-warned-change-id only if environment is ttyonur-ozkan-2/+7
As the .last-warned-change-id is only used for change tracking, we don't need to generate/write it outside of the tty. Otherwise, rust-analyzer could create this file, and developers wouldn't be able to see the bootstrap change alerts, assuming that they have already seen them. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-12bootstrap: add doc-comments for `ChangeSeverity`onur-ozkan-1/+3
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-12remove .last-warned-change-id on `x clean`onur-ozkan-0/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-12refactor change-tracking implementationonur-ozkan-27/+70
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-11print the change warnings once for per idonur-ozkan-0/+10
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-11merge `if-available` and `if-unchanged` for `download-ci-llvm`onur-ozkan-8/+10
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-10Allow rustc_private for RustAnalyzerLaurențiu Nicola-2/+1
2023-11-10Auto merge of #117765 - onur-ozkan:fix-117762, r=clubby789bors-0/+6
enable unstable feature on `x clean [PATH]` Since https://github.com/rust-lang/rust/pull/111076 enables unstable cargo feature (`public-dependency`), we need to ensure that unstable features are enabled before reading libstd Cargo.toml. Fixes #117762 cc `@Nilstrieb`
2023-11-09enable unstable feature on `x clean [PATH]`onur-ozkan-0/+6
Since https://github.com/rust-lang/rust/pull/111076 enables unstable cargo feature (`public-dependency`), we need to ensure that unstable features are enabled before reading libstd Cargo.toml. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-09Auto merge of #117708 - onur-ozkan:x-setup, r=clubby789bors-104/+112
check config file before prompts on `x setup` First 2 commit moves the check of configuration existence to the first step of `x setup`. And then followed by a prompt that allows devs to decide whether to continue with the configuration override or exit bootstrap. Closes #110471 I can revert the last commit if needed. Maybe it's just me, but I feel it's better to have those tags capitalized. If you think otherwise, please let me know so that I can revert.
2023-11-09Auto merge of #117122 - ferrocene:pa-configure-git-diff, r=albertlarsan68bors-5/+23
Allow configuring the parent GitHub repository The git integration in build_helper hardcoded `rust-lang/rust` as the parent GitHub repository, and `master` as the branch name. This works great for `rust-lang/rust`, but causes problems in downstream forks like Ferrocene whenever those functions are invoked (like `./x fmt`). In `src/stage0.json` there was already a configuration key for the name of the nightly branch, but it wasn't used by build_helper. This PR adds the `github_repository` key to the file, and requires both values to be passed to build_helper whenever a git function is called. This will allow downstream forks to tweak the values.
2023-11-09chore(bootstrap): capitalize {error, warning, info, note} tagsonur-ozkan-92/+92
This should enhance the readability. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-09allow users to override the existing configuration during x setuponur-ozkan-1/+11
Instead of immediately terminating bootstrap, users are now given the option to decide whether they want to override the file or leave it unchanged. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-09check config file before prompts on x setuponur-ozkan-13/+11
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-09Rollup merge of #117724 - Kobzol:shim-error-message, r=onur-ozkanTakayuki Maeda-1/+3
Restore rustc shim error message Fixes: https://github.com/rust-lang/rust/pull/117595#discussion_r1382482249 The error message was originally introduced in https://github.com/rust-lang/rust/pull/111323, and subsequently broken by my change in https://github.com/rust-lang/rust/pull/116448. r? ``@onur-ozkan``
2023-11-09Rollup merge of #117723 - onur-ozkan:keep-bootstrap-on-x-clean, r=albertlarsan68Takayuki Maeda-1/+0
speed up `x clean` Since `x clean` runs with bootstrap, we can speed up this process by avoiding the cleaning of bootstrap artifacts, as they are not necessarily needed to be cleaned. ref #https://github.com/rust-lang/rust/issues/117653#issuecomment-1802482768
2023-11-08Restore rustc shim error messageJakub Beránek-1/+3
2023-11-08speed up `x clean`onur-ozkan-1/+0
Since `x clean` runs with bootstrap, we can speed up this process by avoiding the cleaning of bootstrap artifacts, as they are not necessarily needed to be cleaned. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-08Rollup merge of #117263 - onur-ozkan:change-id-fix, r=saethlinGuillaume Gomez-24/+40
handle the case when the change-id isn't found When we switch back and forth between the old and recent branches, if there was a breaking change in the bootstrap configuration in between, we have to update the change-id in the build configuration with each checkout, which can be exhausting. This change fixes that. r? saethlin
2023-11-08bootstrap: add more detail on change-id commentsonur-ozkan-4/+7
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-08bootstrap: improve `fn check_version`onur-ozkan-21/+21
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-08handle the case when the change-id isn't foundonur-ozkan-12/+25
When we switch back and forth between the old and recent branches, if there was a breaking change in the bootstrap configuration in between, we have to update the change-id in the build configuration with each checkout, which can be exhausting. This change fixes that. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-08Rollup merge of #117700 - Zalathar:rename-run-coverage, r=onur-ozkanMatthias Krüger-13/+13
coverage: Rename the `run-coverage` test mode to `coverage-run` Follow-up to https://github.com/rust-lang/rust/pull/117484#issuecomment-1788916563. Renaming this test mode to `coverage-run` makes it more consistent with the `coverage-map` mode and the shared `tests/coverage` test directory. --- ``@rustbot`` label +A-code-coverage
2023-11-08Rollup merge of #117667 - Alexendoo:doc-clippy-config, r=albertlarsan68Matthias Krüger-1/+1
Document clippy_config in nightly-rustc docs A new clippy crate added in https://github.com/rust-lang/rust-clippy/pull/11685
2023-11-08Rollup merge of #117663 - klensy:bump-deps, r=davidtwcoMatthias Krüger-36/+4
bump some deps * drop `num_cpus` from rust-installer as not used * update `rayon`, `rayon-core`, which drops it's deps on `num_cpus` and `crossbeam-channel` (for bootstrap too) (https://github.com/rayon-rs/rayon/blob/v1.8.0/RELEASES.md) * update `errno`, which drops `errno-dragonfly` (https://github.com/lambda-fairy/rust-errno/blob/5341791935df601306ffc57a665763c4ecd72755/CHANGELOG.md)
2023-11-08Auto merge of #116881 - LuuuXXX:issue-110087, r=onur-ozkanbors-29/+113
Add a new `download-ci-llvm = if-unchanged` option and enable it by default for `profile = codegen` Three tasks have been implemented here. Add a new `download-ci-llvm = if-unchange` option and enable if by default for `profile = codegen`. Include all build artifacts by traversing the llvm-project build output, Keep the downloadable llvm the same state as if you have just run a full source build. After selecting the codegen profile during ./x.py setup, the submodule will be automatically downloaded. Resolves #110087
2023-11-08coverage: Rename the `run-coverage` test mode to `coverage-run`Zalathar-13/+13
This makes it more consistent with the `coverage-map` mode and the shared `tests/coverage` test directory.
2023-11-08Fix issue #110087LuuuX-29/+113
Three tasks have been implemented here. Add a new `download-ci-llvm = if-unchange` option and enable if by default for `profile = codegen`. Include all build artifacts by traversing the llvm-project build output, Keep the downloadable llvm the same state as if you have just run a full source build. After selecting the codegen profile during ./x.py setup, the submodule will be automatically downloaded.
2023-11-07Document clippy_config in nightly-rustc docsAlex Macleod-1/+1
2023-11-07bump some depsklensy-36/+4
drop num_cpus from rust-installer as not used update rayon, rayon-core, which drops it's deps on num_cpus and crossbeam-channel (for bootstrap too) (https://github.com/rayon-rs/rayon/blob/v1.8.0/RELEASES.md) update erro, which drops errno-dragonfly (https://github.com/lambda-fairy/rust-errno/blob/5341791935df601306ffc57a665763c4ecd72755/CHANGELOG.md)
2023-11-07coverage: Register `test::Coverage` as the test suite for `tests/coverage`Zalathar-1/+2
This restores the ability to run a coverage test by specifying its path, e.g. `./x.py test tests/coverage/if.rs`. This runs the test in both modes.
2023-11-07coverage: Migrate `tests/coverage-map` into `tests/coverage`Zalathar-13/+5
2023-11-07coverage: Migrate `tests/run-coverage` into `tests/coverage`Zalathar-9/+7
2023-11-07coverage: Set up a macro for declaring unified coverage test suitesZalathar-0/+53
2023-11-07coverage: Add `./x.py test coverage`, an alias for `coverage-map` and ↵Zalathar-0/+51
`run-coverage`
2023-11-06rename github_repository to git_repositoryPietro Albini-4/+4
2023-11-06Auto merge of #117435 - SparrowLii:nightly_parallel, r=oli-obk,davidtwcobors-2/+5
enable parallel rustc front end in nightly builds Refers to the [MCP](https://github.com/rust-lang/compiler-team/issues/681), this pr does: 1. Enable the parallel front end in nightly builds, and keep the default number of threads as 1. Then users can use the parallel rustc front end via -Z threads=n option. 2. Set it up to serial front end for beta/stable builds via bootstrap. 3. Switch over the alt builders from parallel rustc to serial, so we have artifacts without parallel to test against the artifacts with parallel. r? `@oli-obk` cc `@cjgillot` `@nnethercote` `@bjorn3` `@Kobzol`
2023-11-05Auto merge of #117574 - onur-ozkan:fix-compiler-crate-linking, r=Mark-Simulacrumbors-57/+72
improve compiler&tool documenting and re-enable cranelift on CI First commit addresses the linking issue with compiler crates. Second one ensures that compiler crates are linked correctly (with later commits we added this check for tools as well), allowing us to detect these hard-to-catch bugs on CI. Following three commits cherry-picked from #117328 to re-enable the Cranelift backend on CI. More info: https://github.com/rust-lang/rust/issues/117430 cc `@bjorn3` `@RalfJung`
2023-11-05bootstrap: improve linking of tool docsonur-ozkan-41/+40
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-05Rollup merge of #117524 - unleashed:bootstrap-create-hooks-dir, ↵Matthias Krüger-1/+6
r=Mark-Simulacrum bootstrap/setup: create hooks directory if non-existing When running `./x setup` on a local repository I chose to install a `pre-push` git hook, but this happened: ```shell Would you like to install the git hook?: [y/N] y error: could not create hook .git/hooks/pre-push: do you already have the git hook installed? No such file or directory (os error 2) thread 'main' panicked at src/core/build_steps/setup.rs:462:9: install_git_hook_maybe(&config) failed with No such file or directory (os error 2) ``` This was caused because the `.git/hooks` directory did not exist in my local repository. Creating it manually and re-running the command works fine. This PR tests for the above directory and if it does not exist then it _tries_ to create it before hard linking the pre-push hook - we use `fs::create_dir()` and disregard the result (ie. it could fail if the directory was created in the meantime) and proceed to call `fs::hard_link()` all the same.