-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove duplicate aliases for check codegen_{cranelift,gcc}
and fix build codegen_gcc
#95901
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
Bootstrap already allows selecting these in `PathSet::has`, which allows any string that matches the end of a full path. I found these by adding `assert!(path.exists())` in `StepDescription::paths`. I think ideally we wouldn't have any aliases that aren't paths, but I've held off on enforcing that here since it may be controversial, I'll open a separate PR.
These paths (`_cranelift` and `_gcc`) are somewhat misleading, since they actually tell bootstrap to build *all* codegen backends. But this seems like a useful improvement in the meantime.
5d25a30
to
4c14383
Compare
This seems like it matches behavior for other such things (e.g., we build all compiler crates regardless of which one in particular is specified), so it definitely seems OK to me at this time. @bors r+ |
📌 Commit 4c14383 has been approved by |
👍 Makes sense. Just FYI, I would like to make bootstrap more granular in the long term - #95503 is a first step there, and I hope to eventually remove |
Yeah, it makes sense to me as a goal (I often manually hack this by editing bootstrap with a -p flag when I want it today). I think we'll want to be careful around the UX of actually building a sysroot with std or without (since rustc is not "at" an obvious place in the crate tree) but we'll figure that out as we go, I'm sure. |
…Mark-Simulacrum Remove duplicate aliases for `check codegen_{cranelift,gcc}` and fix `build codegen_gcc` * Remove duplicate aliases Bootstrap already allows selecting these in `PathSet::has`, which allows any string that matches the end of a full path. I found these by adding `assert!(path.exists())` in `StepDescription::paths`. I think ideally we wouldn't have any aliases that aren't paths, but I've held off on enforcing that here since it may be controversial, I'll open a separate PR. * Add `build compiler/rustc_codegen_gcc` as an alias for `CodegenBackend` These paths (`_cranelift` and `_gcc`) are somewhat misleading, since they actually tell bootstrap to build *all* codegen backends. But this seems like a useful improvement in the meantime. cc `@bjorn3` `@antoyo`
…Mark-Simulacrum Remove duplicate aliases for `check codegen_{cranelift,gcc}` and fix `build codegen_gcc` * Remove duplicate aliases Bootstrap already allows selecting these in `PathSet::has`, which allows any string that matches the end of a full path. I found these by adding `assert!(path.exists())` in `StepDescription::paths`. I think ideally we wouldn't have any aliases that aren't paths, but I've held off on enforcing that here since it may be controversial, I'll open a separate PR. * Add `build compiler/rustc_codegen_gcc` as an alias for `CodegenBackend` These paths (`_cranelift` and `_gcc`) are somewhat misleading, since they actually tell bootstrap to build *all* codegen backends. But this seems like a useful improvement in the meantime. cc ``@bjorn3`` ``@antoyo``
Rollup of 7 pull requests Successful merges: - rust-lang#95008 ([`let_chains`] Forbid `let` inside parentheses) - rust-lang#95801 (Replace RwLock by a futex based one on Linux) - rust-lang#95864 (Fix miscompilation of inline assembly with outputs in cases where we emit an invoke instead of call instruction.) - rust-lang#95894 (Fix formatting error in pin.rs docs) - rust-lang#95895 (Clarify str::from_utf8_unchecked's invariants) - rust-lang#95901 (Remove duplicate aliases for `check codegen_{cranelift,gcc}` and fix `build codegen_gcc`) - rust-lang#95927 (CI: do not compile libcore twice when performing LLVM PGO) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…Simulacrum Require all paths passed to `ShouldRun::paths` to exist on disk This has two benefits: 1. There is a clearer mental model of how bootstrap works. Steps correspond to paths on disk unless it's strictly impossible for them to do so (e.g. dist components). 2. Bootstrap has better checks for internal consistency. This caught several issues: - `src/sanitizers` doesn't exist; I changed it to just be a `sanitizers` alias. - `src/tools/lld` doesn't exist; I removed it, since `lld` alone already works. - `src/llvm` doesn't exist; removed it since `llvm` and `src/llvm-project` both work. - `src/lldb_batchmode.py` doesn't exist, it was moved to `src/etc`. - `install` was still using `src/librustc` instead of `compiler/rustc`. - None of the tools in `dist` / `install` allowed using `src/tools/X` to build them. This might be intentional - I can change them to aliases if you like. Builds on rust-lang#95901 and should not be merged before.
…Simulacrum Require all paths passed to `ShouldRun::paths` to exist on disk This has two benefits: 1. There is a clearer mental model of how bootstrap works. Steps correspond to paths on disk unless it's strictly impossible for them to do so (e.g. dist components). 2. Bootstrap has better checks for internal consistency. This caught several issues: - `src/sanitizers` doesn't exist; I changed it to just be a `sanitizers` alias. - `src/tools/lld` doesn't exist; I removed it, since `lld` alone already works. - `src/llvm` doesn't exist; removed it since `llvm` and `src/llvm-project` both work. - `src/lldb_batchmode.py` doesn't exist, it was moved to `src/etc`. - `install` was still using `src/librustc` instead of `compiler/rustc`. - None of the tools in `dist` / `install` allowed using `src/tools/X` to build them. This might be intentional - I can change them to aliases if you like. Builds on rust-lang#95901 and should not be merged before.
…mulacrum Require all paths passed to `ShouldRun::paths` to exist on disk This has two benefits: 1. There is a clearer mental model of how bootstrap works. Steps correspond to paths on disk unless it's strictly impossible for them to do so (e.g. dist components). 2. Bootstrap has better checks for internal consistency. This caught several issues: - `src/sanitizers` doesn't exist; I changed it to just be a `sanitizers` alias. - `src/tools/lld` doesn't exist; I removed it, since `lld` alone already works. - `src/llvm` doesn't exist; removed it since `llvm` and `src/llvm-project` both work. - `src/lldb_batchmode.py` doesn't exist, it was moved to `src/etc`. - `install` was still using `src/librustc` instead of `compiler/rustc`. - None of the tools in `dist` / `install` allowed using `src/tools/X` to build them. This might be intentional - I can change them to aliases if you like. Builds on rust-lang#95901 and should not be merged before.
Remove duplicate aliases
Bootstrap already allows selecting these in
PathSet::has
, which allowsany string that matches the end of a full path.
I found these by adding
assert!(path.exists())
inStepDescription::paths
.I think ideally we wouldn't have any aliases that aren't paths, but I've held
off on enforcing that here since it may be controversial, I'll open a separate PR.
Add
build compiler/rustc_codegen_gcc
as an alias forCodegenBackend
These paths (
_cranelift
and_gcc
) are somewhat misleading, since theyactually tell bootstrap to build all codegen backends. But this seems like
a useful improvement in the meantime.
cc @bjorn3 @antoyo