about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2023-11-24add change information for PR#117813onur-ozkan-0/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-24Rollup merge of #118187 - onur-ozkan:recompile-llvm-on-changes, r=clubby789Michael Goulet-2/+50
Recompile LLVM when it changes in the git sources Utilize a smart hash for 'llvm-finished-building' to enable recompilation of LLVM with each change in the git sources. Each change generates a unique hash value in 'llvm-finished-building', which ensures LLVM compilations only triggered with further changes. Resolves #111893 cc `@rust-lang/wg-llvm`
2023-11-24Auto merge of #117782 - majaha:tidy_fix, r=onur-ozkanbors-7/+10
Fix tidy tripping up on untracked files with special characters in their name Previously, the tidy tool would fault if an untracked file had a space or other special characters in its name. If there was an untracked file "foo bar", it would include the quoting in it's path and split on the first space, giving output like this: `skip untracked path "foo during rustfmt invocations`
2023-11-24Fix build on Solaris after #117815.Petr Sumbera-3/+3
2023-11-23Fix tidy on untracked files with special characterMatt Harding-7/+10
Previously, the tidy tool would fault if an untracked file had a space or other special characters in its name. If there was an untracked file "foo bar", it would include the quoting in it's path and split on the first space, giving output like this: `skip untracked path "foo during rustfmt invocations`
2023-11-23Auto merge of #117815 - onur-ozkan:update-change-tracking-impl, r=albertlarsan68bors-29/+90
improve bootstrap change-tracking system This PR aims to improve how change-tracking system works for bootstrap changes by doing the followings: - Enforce embedding directive informations about the changes on `bootstrap/src/lib.rs`. - Give more informative change inputs on the terminal (https://github.com/rust-lang/rust/pull/117815#discussion_r1390239657). - Avoid spamming the change informations(by reading and creating `.last-warned-change-id` under build output dir). see the zulip conversation for more details: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/config.2Etoml.20change.20tracking cc `@RalfJung`
2023-11-23Auto merge of #116449 - Kobzol:bootstrap-rustdoc-shim, r=petrochenkovbors-33/+79
Pass flags to `rustdoc` shim without env. vars Discussed here: https://github.com/rust-lang/rust/pull/116448#issuecomment-1748785961. Since it was not really documented why these flags were passed through the shim, I guess that the only way to find out if it's really needed... is to remove it :) r? `@petrochenkov`
2023-11-23Add LLD flags to rustdoc cargo invocationsJakub Beránek-20/+64
2023-11-23Recompile LLVM when it changes in the git sourcesonur-ozkan-2/+50
Utilize a smart hash for 'llvm-finished-building' to enable recompilation of LLVM with each change in the git sources. Each change generates a unique hash value in 'llvm-finished-building', which ensures LLVM compilations only triggered with further changes. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-22Rollup merge of #118013 - sivadeilra:user/ardavis/ehcont, r=wesleywiserMichael Goulet-1/+14
Enable Rust to use the EHCont security feature of Windows In the future Windows will enable Control-flow Enforcement Technology (CET aka Shadow Stacks). To protect the path where the context is updated during exception handling, the binary is required to enumerate valid unwind entrypoints in a dedicated section which is validated when the context is being set during exception handling. The required support for EHCONT Guard has already been merged into LLVM, long ago. This change simply adds the Rust codegen option to enable it. Relevant LLVM change: https://reviews.llvm.org/D40223 This also adds a new `ehcont-guard` option to the bootstrap config which enables EHCont Guard when building std. We at Microsoft have been using this feature for a significant period of time; we are confident that the LLVM feature, when enabled, generates well-formed code. We currently enable EHCONT using a codegen feature, but I'm certainly open to refactoring this to be a target feature instead, or to use any appropriate mechanism to enable it.
2023-11-21update -Cehcont-guard and commentArlie Davis-3/+7
2023-11-21x.py fmtArlie Davis-5/+1
2023-11-21Add support for generating the EHCont sectionArlie Davis-2/+15
In the future Windows will enable Control-flow Enforcement Technology (CET aka Shadow Stacks). To protect the path where the context is updated during exception handling, the binary is required to enumerate valid unwind entrypoints in a dedicated section which is validated when the context is being set during exception handling. The required support for EHCONT has already been merged into LLVM, long ago. This change adds the Rust codegen option to enable it. Reference: * https://reviews.llvm.org/D40223 This also adds a new `ehcont-guard` option to the bootstrap config which enables EHCont Guard when building std.
2023-11-21Update the minimum external LLVM to 16.Dario Nieuwenhuis-2/+2
2023-11-21[Miri] Do not respect RUSTC_HOST_FLAGS since RUSTFLAGS isn'tUrgau-1/+1
When building the standard library with Miri, it appears that cargo-miri does not respect the RUSTFLAGS and even if they did it would be wrong since they are created for ToolRustc not Std. To avoid errors ignore RUSTC_HOST_FLAGS for Miri.
2023-11-21Rollup merge of #118083 - calebzulawski:remove-i686-apple-darwin, ↵Nilstrieb-1/+1
r=albertlarsan68 Remove i686-apple-darwin cross-testing The Xcode SDK no longer ships with 32-bit Intel (i686-apple-darwin) support as of [Xcode 14](https://developer.apple.com/news/upcoming-requirements/?id=06062022a) (related, #112753). On an up-to-date Intel Mac, `x.py test --bless` fails. r? ``@rust-lang/bootstrap``
2023-11-21utilize stdlib debug assertion status in compiletestonur-ozkan-0/+4
Implemented a new flag, `--with-debug-assertions` on compiletest to pass the stdlib debug assertion status from bootstrap. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-21Rollup merge of #118059 - Nilstrieb:unset-cargo, r=dtolnayNilstrieb-0/+5
Explicitly unset $CARGO for compiletest Some UI tests trigger behavior in rustc where it reads $CARGO and changes behavior if it exists. To make the tests work that rely on it not being set, make sure it is not set. By default, this is not set, but people may do weird hacks that cause it to be set. closes #118058
2023-11-19Remove i686-apple-darwin cross-testingCaleb Zulawski-1/+1
2023-11-19Auto merge of #117888 - notriddle:notriddle/releases, r=Mark-Simulacrumbors-1/+101
doc: add release notes to standalone doc bundle Preview: http://notriddle.com/rustdoc-html-demo-5/release-notes/releases.html 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-19Explicitly unset $CARGO for compiletestNilstrieb-0/+5
Some UI tests trigger behavior in rustc where it reads $CARGO and changes behavior if it exists. To make the tests work that rely on it not being set, make sure it is not set. By default, this is not set, but people may do weird hacks that cause it to be set.
2023-11-19Fix outdated doc comment on Releases doc build stepMichael Howell-7/+4
2023-11-19Auto merge of #117868 - ferrocene:pa-omit-git-hash, r=Mark-Simulacrumbors-0/+7
Set `CFG_OMIT_GIT_HASH=1` during builds when `omit-git-hash` is enabled This environment variable will allow tools like Cargo to disable their own detection when `omit-git-hash` is set to `true`. I created this PR because of https://github.com/rust-lang/cargo/pull/12968. There is not a dependency between the two PRs, they can land in any order. They just won't do anything until both of them are merged into the repo.
2023-11-18Do not call dry_run twiceMichael Howell-2/+3
Co-authored-by: Onur Özkan <onurozkan.dev@outlook.com>
2023-11-18Auto merge of #117813 - onur-ozkan:simplify-download-ci-llvm-option, ↵bors-8/+10
r=Mark-Simulacrum deprecate `if-available` value of `download-ci-llvm` This PR deprecates the use of the `if-available` value for `download-ci-llvm` since `if-unchanged` serves the same purpose when no changes are detected. In cases where changes are present, it is assumed that compiling LLVM is acceptable (otherwise, why make changes there?). This was probably missing in the #110087 issue before. cc `@RalfJung`
2023-11-18Unify passing of flags to rustdocJakub Beránek-24/+26
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>