summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2023-11-12Cranelift isn't available on non-nightly channelsMark Rousskov-4/+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.
2023-11-05Rollup merge of #116017 - Zalathar:darwin-stdlib, r=albertlarsan68Matthias Krüger-4/+3
Don't pass `-stdlib=libc++` when building C files on macOS When using *Command Line Tools for Xcode* version 15.0, clang will warn about `argument unused during compilation: '-stdlib=libc++'` if this flag is present when compiling C files only (i.e. no C++ files). To avoid this warning, we can add the flag only to CXXFLAGS and not to CFLAGS. --- [Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/clang.20warning.3A.20argument.20unused.20during.20compilation.20.28libc.2B.2B.29)
2023-11-04Don't disable inline asm usage in compiler-builtins when the cranelift ↵bjorn3-5/+0
backend is enabled This was a leftover from when inline asm wasn't universally supported by the cranelift backend yet. It would cause the optimized inline asm intrinsics to be avoided for the standard library distributed with rustup now that we build the cranelift backend by default on nightly for several tier 1 targets.
2023-11-04ensure doc directory is not emptyonur-ozkan-1/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-04handle dry runs in `dist::CodegenBackend`Rémy Rakic-0/+4
self.number_of_times_dry_runs_have_caused_issues += 1;
2023-11-04Ensure the rustc-codegen-cranelift-preview component is never emptybjorn3-0/+7
Either generate it with the actual codegen backend dylib or omit it entirely when the cranelift backend is disabled for this build.
2023-11-04add sanity check for compiler crate docsonur-ozkan-0/+8
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-04Ensure compiler crate paths are generated before linkingonur-ozkan-11/+12
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-03Auto merge of #117538 - matthiaskrgr:rollup-63u77xb, r=matthiaskrgrbors-7/+1
Rollup of 5 pull requests Successful merges: - #117434 (delegate `<Box<E> as Error>::provide` to `<E as Error>::provide`) - #117505 (Fix incorrect trait bound restriction suggestion) - #117520 (Clippy subtree update) - #117523 (oli-obk is on vacation) - #117533 (Revert "bootstrap: do not purge docs on CI environment") r? `@ghost` `@rustbot` modify labels: rollup
2023-11-03Rollup merge of #117533 - onur-ozkan:revert-117471, r=onur-ozkanMatthias Krüger-7/+1
Revert "bootstrap: do not purge docs on CI environment" This reverts commit 6198e881d363730900b7b0d4fa8311b3844421a7. ref https://github.com/rust-lang/rust/issues/117430#issuecomment-1791609163, https://github.com/rust-lang/rust/pull/117471#issuecomment-1791937529
2023-11-03Revert "Auto merge of #117328 - lqd:cranelift-rocket, r=Mark-Simulacrum"Ralf Jung-11/+0
This reverts commit 1dfb6b162be402d8ca37e8aad4f58898b44e3a15, reversing changes made to bcb5798dd890a691644af9d371f3bd7fcc465584. That commit broke generating nightly rustc docs. Revert it until we can figure out how to have both, cranelift and docs.
2023-11-03Revert "bootstrap: do not purge docs on CI environment"onur-ozkan-7/+1
This reverts commit 6198e881d363730900b7b0d4fa8311b3844421a7.
2023-11-03Auto merge of #117313 - GuillaumeGomez:cg_gcc-tests, r=onur-ozkanbors-2/+156
Run part of `rustc_codegen_gcc`'s tests in CI Thanks to #112701 and `@bjorn3,` it made this much easier. Also cc `@antoyo.` r? `@bjorn3`
2023-11-02bootstrap/setup: create hooks directory if non-existingAlejandro Martinez Ruiz-1/+6
2023-11-02Add FIXME header for two comments in cg_gcc and cg_clif boostrap typesGuillaume Gomez-2/+2
2023-11-02Force mangling version for rustc_codegen_gccGuillaume Gomez-0/+1
2023-11-02Only run cg_gcc tests on linux x86_64Guillaume Gomez-10/+2