about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2023-12-06Rollup merge of #117981 - Urgau:check-cfg-remove-deprecated-syntax, r=b-naberMatthias Krüger-3/+3
Remove deprecated `--check-cfg` syntax This PR removes the deprecated `--check-cfg` `names(...)` and `values(...)` syntax. Follow up to https://github.com/rust-lang/rust/pull/111072 Part of https://github.com/rust-lang/compiler-team/issues/636 r? compiler
2023-12-06Rollup merge of #118650 - RalfJung:flags-sync, r=clubby789Matthias Krüger-0/+2
add comment about keeping flags in sync between bootstrap.py and bootstrap.rs They got out of sync, probably because this comment was missing on the Python side (it only exists on the Rust side). https://github.com/rust-lang/rust/pull/118642 brings the flags back in sync but does not fix the comment, so let's do that here. r? clubby789
2023-12-05Rollup merge of #118642 - Xanewok:patch-1, r=clubby789Michael Goulet-1/+0
bootstrap(builder.rs): Don't explicitly warn against `semicolon_in_expressions_from_macros` This already wasn't passed in bootstrap.py and the lint itself already warns-by-default for 2 years now and has already been added to the future-incompat group in Rust 1.68. See https://github.com/rust-lang/rust/issues/79813 for the tracking issue.
2023-12-05add comment about keeping flags in sync between bootstrap.py and bootstrap.rsRalf Jung-0/+2
2023-12-05Update bootstrap libc to 0.2.150Urgau-3/+3
Version 0.2.150 include support for the new check-cfg syntax
2023-12-05bootstrap(builder.rs): Don't explicitly warn against ↵Igor Matuszewski-1/+0
`semicolon_in_expressions_from_macros` This already wasn't passed in bootstrap.py and the lint itself already warns-by-default for 2 years now and has already been added to the future-incompat group in Rust 1.68. See https://github.com/rust-lang/rust/issues/79813 for the tracking issue.
2023-12-05Fix x not to quit when x prints settings.jsonlong-long-float-6/+7
Use `while` instead of `loop` Co-authored-by: Onur Özkan <onurozkan.dev@outlook.com> Update prompt message
2023-12-05Add safe compilation optionsl00846161-0/+13
Add two options when building rust: strip and stack protector. If set `strip = true`, symbols will be stripped using `-Cstrip=symbols`. Also can set `stack-protector` and stack protectors will be used.
2023-12-02replace `once_cell::sync::OnceCell` with std `OnceLock`onur-ozkan-15/+14
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-29Auto merge of #118132 - onur-ozkan:stdlib-assertion-status-to-compiletest, ↵bors-0/+4
r=wesleywiser utilize stdlib debug assertion status in compiletest Implemented a new flag `--with-debug-assertions` on compiletest to pass the stdlib debug assertion status from bootstrap. Resolves #115171
2023-11-28Rollup merge of #118323 - onur-ozkan:better-error-for-incorrect-profiles, ↵Matthias Krüger-0/+5
r=clubby789 give dev-friendly error message for incorrect config profiles before this change, an incorrect profile would result in the following error: ```sh ... ... File "/home/nimda/devspace/onur-ozkan/rust/src/bootstrap/bootstrap.py", line 1088, in bootstrap with open(include_path) as included_toml: ^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/home/nimda/devspace/onur-ozkan/rust/src/bootstrap/defaults/config.aaaa.toml' ``` with this change, the error message is now: ```sh ... ... File "/home/nimda/devspace/onur-ozkan/rust/src/bootstrap/bootstrap.py", line 1088, in bootstrap raise Exception("Unrecognized profile '{}'. Check src/bootstrap/defaults" Exception: Unrecognized profile 'aaaa'. Check src/bootstrap/defaults for available options. ```
2023-11-27Auto merge of #117947 - Dirbaio:drop-llvm-15, r=cuviperbors-2/+2
Update the minimum external LLVM to 16. With this change, we'll have stable support for LLVM 16 and 17. For reference, the previous increase to LLVM 15 was #114148 [Relevant zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/riscv.20forced-atomics)
2023-11-27Auto merge of #118352 - Zalathar:llvm-hash, r=onur-ozkanbors-5/+9
bootstrap: Memoize the LLVM rebuild hash to avoid very slow `x check` Recently I've encountered a massive regression in the performance of re-running `x check` after making no changes. It used to take around 2 seconds, and now it takes 20-30 seconds. That's quite a hassle when r-a runs it every time I save. After some poking around, what I've found is that each individual call to `generate_smart_stamp_hash` doesn't take a particularly long time (around 0.5 sec), but it gets called dozens of times during `x check`, and that seems to be what's adding up to 20-30 seconds. --- https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/Massive.20regression.20in.20no-op.20.60x.20check.60 cc `@onur-ozkan`
2023-11-27bootstrap: Memoize the LLVM rebuild hash to avoid very slow `x check`Zalathar-5/+9
2023-11-27Rollup merge of #118322 - onur-ozkan:if-only-doctests-skip-compiletest, ↵Matthias Krüger-1/+9
r=clubby789 skip {tidy,compiletest,rustdoc-gui} based tests for `DocTests::Only` As use of `--doc` with `x test` is intended for running doc-tests only, executing compiletest, tidy or rustdoc-gui based tests considered as an incorrect behavior from bootstrap. This change fixes that.
2023-11-26give dev-friendly error message for incorrect config profilesonur-ozkan-0/+5
before this change, an incorrect profile would result in the following error: ```sh ... ... File "/home/nimda/devspace/onur-ozkan/rust/src/bootstrap/bootstrap.py", line 1088, in bootstrap with open(include_path) as included_toml: ^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/home/nimda/devspace/onur-ozkan/rust/src/bootstrap/defaults/config.aaaa.toml' ``` with this change, the error message is now: ```sh ... ... File "/home/nimda/devspace/onur-ozkan/rust/src/bootstrap/bootstrap.py", line 1088, in bootstrap raise Exception("Unrecognized profile '{}'. Check src/bootstrap/defaults" Exception: Unrecognized profile 'aaaa'. Check src/bootstrap/defaults for available options. ``` Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-26skip {tidy,compiletest,rustdoc-gui} based tests for `DocTests::Only`onur-ozkan-1/+9
As use of `--doc` with `x test` is intended for running doc-tests only, executing compiletest, tidy or rustdoc-gui based tests considered as an incorrect behavior from bootstrap. This change fixes that. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-25bootstrap: remove unused commentWeihang Lo-2/+0
resolver-tests is for test only so no need to document it.
2023-11-25bootstrap: sort items of cargo docsWeihang Lo-4/+4
2023-11-25bootstrap: build `rustfix` doc from `src/tools/cargo`Weihang Lo-0/+1
2023-11-25Rollup merge of #118220 - onur-ozkan:followups, r=Mark-SimulacrumLeón Orell Valerian Liehr-88/+99
general improvements/fixes on bootstrap - adds #117813 into change tracker https://github.com/rust-lang/rust/pull/118220/commits/6d9b92f83fc024d4e86fc90436860903829289bb - fixes a bug in change tracker https://github.com/rust-lang/rust/pull/118220/commits/63a44109525d7ead76390cf50024939b2118b5ba - relocates `CONFIG_CHANGE_HISTORY` https://github.com/rust-lang/rust/pull/118220/commits/a7dcb984f644eaa56d91028abcc6e71c2cc2511b
2023-11-25Auto merge of #118235 - psumbera:bootstrap-main-t, r=Mark-Simulacrumbors-3/+3
Fix build on Solaris after #117815.
2023-11-24move CONFIG_CHANGE_HISTORY to its own moduleonur-ozkan-91/+97
Because bootstrap lib is already large and complicated, this should make the "bumping change-id" process easier. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-24use the change-id from source instead of the one from config.tomonur-ozkan-2/+2
This fixes the problem of not being able to see bootstrap config changes unless the change-id in config.toml changes. Signed-off-by: onur-ozkan <work@onurozkan.dev>
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