Skip to content

Commit db393ad

Browse files
committed
Use an auto-patched copy of rustc_codegen_ssa (dubbed pqp_cg_ssa).
1 parent 929b227 commit db393ad

File tree

18 files changed

+446
-26
lines changed

18 files changed

+446
-26
lines changed

.github/workflows/lint.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,16 @@ function version_test() {
8787
# FIXME(eddyb) try to get this working for `spirv-builder`, which has a larger
8888
# dependency graph, with too much imprecision in upstream `Cargo.toml` files.
8989
version_test crates/spirv-std
90+
91+
# 3. Ensure `rustc_codegen_spirv` still compiles with `rustc_codegen_ssa`.
92+
93+
# HACK(eddyb) see `crates/rustc_codegen_spirv/build.rs` for more on `pqp_cg_ssa`
94+
# (a patched copy of `rustc_codegen_ssa`).
95+
echo ::group::rustc_codegen_spirv_disable_pqp_cg_ssa
96+
cargo clippy \
97+
--manifest-path "crates/rustc_codegen_spirv/Cargo.toml" \
98+
--no-default-features \
99+
--features "$FEAT" \
100+
--all-targets \
101+
-- -D warnings --cfg rustc_codegen_spirv_disable_pqp_cg_ssa
102+
echo ::endgroup::

Cargo.lock

Lines changed: 132 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/rustc_codegen_spirv/Cargo.toml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ num-traits = { workspace = true, default-features = true }
4646
once_cell = "1"
4747
regex = { version = "1", features = ["perf"] }
4848

49+
# HACK(eddyb) deps of `rustc_codegen_ssa`, for `pqp_cg_ssa` (see `build.rs`),
50+
# that cannot be handled with just `extern crate` pulling out of the sysroot.
51+
object = { version = "0.32.1", default-features = false, features = ["read_core", "elf", "macho", "pe", "xcoff", "unaligned", "archive", "write", "wasm"] }
52+
thorin-dwp = "0.7"
53+
4954
# Normal dependencies.
5055
ar = "0.9.0"
5156
either = "1.8.0"
@@ -63,7 +68,16 @@ itertools = "0.10.5"
6368
[dev-dependencies]
6469
pipe = "0.4"
6570
pretty_assertions = "1.0"
66-
tempfile = "3.4"
71+
72+
# HACK(eddyb) can't re-introduce deps of `rustc_codegen_ssa`, for `pqp_cg_ssa`
73+
# (see `build.rs`).
74+
# tempfile = "3.4"
75+
76+
# HACK(eddyb) deps of `rustc_codegen_ssa`, for `pqp_cg_ssa` (see `build.rs`),
77+
# that cannot be handled with just `extern crate` pulling out of the sysroot.
78+
[target.'cfg(windows)'.dependencies.windows]
79+
version = "0.52.0"
80+
features = ["Win32_Globalization"]
6781

6882
# Note that in order to use RA and have access to `rustc_*` crates, you also
6983
# need to set `"rust-analyzer.rustcSource": "discover"` in e.g. VSCode.

0 commit comments

Comments
 (0)