Skip to content

Commit 9758acb

Browse files
committed
refactor: Reuse PkgType from build-manifest
1 parent 196849b commit 9758acb

File tree

13 files changed

+912
-940
lines changed

13 files changed

+912
-940
lines changed

Cargo.toml

+55-55
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
11
[workspace]
22
resolver = "2"
33
members = [
4-
"compiler/rustc",
5-
"src/etc/test-float-parse",
6-
"src/rustdoc-json-types",
7-
"src/tools/build_helper",
8-
"src/tools/cargotest",
9-
"src/tools/clippy",
10-
"src/tools/clippy/clippy_dev",
11-
"src/tools/compiletest",
12-
"src/tools/run-make-support",
13-
"src/tools/error_index_generator",
14-
"src/tools/linkchecker",
15-
"src/tools/lint-docs",
16-
"src/tools/miropt-test-tools",
17-
"src/tools/unstable-book-gen",
18-
"src/tools/tidy",
19-
"src/tools/tier-check",
20-
"src/tools/build-manifest",
21-
"src/tools/remote-test-client",
22-
"src/tools/remote-test-server",
23-
"src/tools/rust-installer",
24-
"src/tools/rustdoc",
25-
"src/tools/rls",
26-
"src/tools/rustfmt",
27-
"src/tools/miri",
28-
"src/tools/miri/cargo-miri",
29-
"src/tools/rustdoc-themes",
30-
"src/tools/unicode-table-generator",
31-
"src/tools/jsondocck",
32-
"src/tools/jsondoclint",
33-
"src/tools/llvm-bitcode-linker",
34-
"src/tools/html-checker",
35-
"src/tools/bump-stage0",
36-
"src/tools/replace-version-placeholder",
37-
"src/tools/lld-wrapper",
38-
"src/tools/collect-license-metadata",
39-
"src/tools/generate-copyright",
40-
"src/tools/suggest-tests",
41-
"src/tools/generate-windows-sys",
42-
"src/tools/rustdoc-gui-test",
43-
"src/tools/opt-dist",
44-
"src/tools/coverage-dump",
45-
"src/tools/rustc-perf-wrapper",
46-
"src/tools/wasm-component-ld",
4+
"compiler/rustc",
5+
"src/etc/test-float-parse",
6+
"src/rustdoc-json-types",
7+
"src/tools/build_helper",
8+
"src/tools/cargotest",
9+
"src/tools/clippy",
10+
"src/tools/clippy/clippy_dev",
11+
"src/tools/compiletest",
12+
"src/tools/run-make-support",
13+
"src/tools/error_index_generator",
14+
"src/tools/linkchecker",
15+
"src/tools/lint-docs",
16+
"src/tools/miropt-test-tools",
17+
"src/tools/unstable-book-gen",
18+
"src/tools/tidy",
19+
"src/tools/tier-check",
20+
"src/tools/build-manifest",
21+
"src/tools/remote-test-client",
22+
"src/tools/remote-test-server",
23+
"src/tools/rust-installer",
24+
"src/tools/rustdoc",
25+
"src/tools/rls",
26+
"src/tools/rustfmt",
27+
"src/tools/miri",
28+
"src/tools/miri/cargo-miri",
29+
"src/tools/rustdoc-themes",
30+
"src/tools/unicode-table-generator",
31+
"src/tools/jsondocck",
32+
"src/tools/jsondoclint",
33+
"src/tools/llvm-bitcode-linker",
34+
"src/tools/html-checker",
35+
"src/tools/bump-stage0",
36+
"src/tools/replace-version-placeholder",
37+
"src/tools/lld-wrapper",
38+
"src/tools/collect-license-metadata",
39+
"src/tools/generate-copyright",
40+
"src/tools/suggest-tests",
41+
"src/tools/generate-windows-sys",
42+
"src/tools/rustdoc-gui-test",
43+
"src/tools/opt-dist",
44+
"src/tools/coverage-dump",
45+
"src/tools/rustc-perf-wrapper",
46+
"src/tools/wasm-component-ld",
4747
]
4848

4949
exclude = [
50-
"build",
51-
"compiler/rustc_codegen_cranelift",
52-
"compiler/rustc_codegen_gcc",
53-
"src/bootstrap",
54-
"tests/rustdoc-gui",
55-
# HACK(eddyb) This hardcodes the fact that our CI uses `/checkout/obj`.
56-
"obj",
57-
# The `x` binary is a thin wrapper that calls `x.py`, which initializes
58-
# submodules, before which workspace members cannot be invoked because
59-
# not all `Cargo.toml` files are available, so we exclude the `x` binary,
60-
# so it can be invoked before the current checkout is set up.
61-
"src/tools/x",
50+
"build",
51+
"compiler/rustc_codegen_cranelift",
52+
"compiler/rustc_codegen_gcc",
53+
"src/bootstrap",
54+
"tests/rustdoc-gui",
55+
# HACK(eddyb) This hardcodes the fact that our CI uses `/checkout/obj`.
56+
"obj",
57+
# The `x` binary is a thin wrapper that calls `x.py`, which initializes
58+
# submodules, before which workspace members cannot be invoked because
59+
# not all `Cargo.toml` files are available, so we exclude the `x` binary,
60+
# so it can be invoked before the current checkout is set up.
61+
"src/tools/x",
6262
]
6363

6464
[profile.release.package.rustc-rayon-core]

src/bootstrap/Cargo.lock

+89
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
# It is not intended for manual editing.
33
version = 3
44

5+
[[package]]
6+
name = "adler2"
7+
version = "2.0.0"
8+
source = "registry+https://github.com/rust-lang/crates.io-index"
9+
checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
10+
511
[[package]]
612
name = "aho-corasick"
713
version = "1.1.3"
@@ -17,6 +23,12 @@ version = "1.0.8"
1723
source = "registry+https://github.com/rust-lang/crates.io-index"
1824
checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
1925

26+
[[package]]
27+
name = "anyhow"
28+
version = "1.0.89"
29+
source = "registry+https://github.com/rust-lang/crates.io-index"
30+
checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6"
31+
2032
[[package]]
2133
name = "bitflags"
2234
version = "2.6.0"
@@ -36,6 +48,7 @@ dependencies = [
3648
name = "bootstrap"
3749
version = "0.0.0"
3850
dependencies = [
51+
"build-manifest",
3952
"build_helper",
4053
"cc",
4154
"clap",
@@ -74,6 +87,22 @@ dependencies = [
7487
"serde",
7588
]
7689

90+
[[package]]
91+
name = "build-manifest"
92+
version = "0.1.0"
93+
dependencies = [
94+
"anyhow",
95+
"flate2",
96+
"hex",
97+
"rayon",
98+
"serde",
99+
"serde_json",
100+
"sha2",
101+
"tar",
102+
"toml",
103+
"xz2",
104+
]
105+
77106
[[package]]
78107
name = "build_helper"
79108
version = "0.1.0"
@@ -168,6 +197,15 @@ dependencies = [
168197
"libc",
169198
]
170199

200+
[[package]]
201+
name = "crc32fast"
202+
version = "1.4.2"
203+
source = "registry+https://github.com/rust-lang/crates.io-index"
204+
checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
205+
dependencies = [
206+
"cfg-if",
207+
]
208+
171209
[[package]]
172210
name = "crossbeam-deque"
173211
version = "0.8.5"
@@ -219,6 +257,12 @@ dependencies = [
219257
"crypto-common",
220258
]
221259

260+
[[package]]
261+
name = "either"
262+
version = "1.13.0"
263+
source = "registry+https://github.com/rust-lang/crates.io-index"
264+
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
265+
222266
[[package]]
223267
name = "errno"
224268
version = "0.3.9"
@@ -252,6 +296,16 @@ dependencies = [
252296
"windows-sys 0.59.0",
253297
]
254298

299+
[[package]]
300+
name = "flate2"
301+
version = "1.0.34"
302+
source = "registry+https://github.com/rust-lang/crates.io-index"
303+
checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0"
304+
dependencies = [
305+
"crc32fast",
306+
"miniz_oxide",
307+
]
308+
255309
[[package]]
256310
name = "generic-array"
257311
version = "0.14.7"
@@ -281,6 +335,12 @@ version = "0.5.0"
281335
source = "registry+https://github.com/rust-lang/crates.io-index"
282336
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
283337

338+
[[package]]
339+
name = "hex"
340+
version = "0.4.3"
341+
source = "registry+https://github.com/rust-lang/crates.io-index"
342+
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
343+
284344
[[package]]
285345
name = "home"
286346
version = "0.5.9"
@@ -368,6 +428,15 @@ version = "2.7.4"
368428
source = "registry+https://github.com/rust-lang/crates.io-index"
369429
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
370430

431+
[[package]]
432+
name = "miniz_oxide"
433+
version = "0.8.0"
434+
source = "registry+https://github.com/rust-lang/crates.io-index"
435+
checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
436+
dependencies = [
437+
"adler2",
438+
]
439+
371440
[[package]]
372441
name = "ntapi"
373442
version = "0.4.1"
@@ -430,6 +499,26 @@ dependencies = [
430499
"proc-macro2",
431500
]
432501

502+
[[package]]
503+
name = "rayon"
504+
version = "1.10.0"
505+
source = "registry+https://github.com/rust-lang/crates.io-index"
506+
checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
507+
dependencies = [
508+
"either",
509+
"rayon-core",
510+
]
511+
512+
[[package]]
513+
name = "rayon-core"
514+
version = "1.12.1"
515+
source = "registry+https://github.com/rust-lang/crates.io-index"
516+
checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
517+
dependencies = [
518+
"crossbeam-deque",
519+
"crossbeam-utils",
520+
]
521+
433522
[[package]]
434523
name = "redox_syscall"
435524
version = "0.5.6"

src/bootstrap/Cargo.toml

+18-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ default-run = "bootstrap"
77

88
[features]
99
build-metrics = ["sysinfo"]
10-
bootstrap-self-test = [] # enabled in the bootstrap unit tests
10+
bootstrap-self-test = [] # enabled in the bootstrap unit tests
1111

1212
[lib]
1313
path = "src/lib.rs"
@@ -41,13 +41,25 @@ cc = "=1.1.22"
4141
cmake = "=0.1.48"
4242

4343
build_helper = { path = "../tools/build_helper" }
44-
clap = { version = "4.4", default-features = false, features = ["std", "usage", "help", "derive", "error-context"] }
44+
build-manifest = { path = "../tools/build-manifest" }
45+
clap = { version = "4.4", default-features = false, features = [
46+
"std",
47+
"usage",
48+
"help",
49+
"derive",
50+
"error-context",
51+
] }
4552
clap_complete = "4.4"
4653
fd-lock = "4.0"
4754
home = "0.5"
4855
ignore = "0.4"
4956
libc = "0.2"
50-
object = { version = "0.36.3", default-features = false, features = ["archive", "coff", "read_core", "unaligned"] }
57+
object = { version = "0.36.3", default-features = false, features = [
58+
"archive",
59+
"coff",
60+
"read_core",
61+
"unaligned",
62+
] }
5163
opener = "0.5"
5264
semver = "1.0"
5365
serde = "1.0"
@@ -63,7 +75,9 @@ walkdir = "2.4"
6375
xz2 = "0.1"
6476

6577
# Dependencies needed by the build-metrics feature
66-
sysinfo = { version = "0.31.2", default-features = false, optional = true, features = ["system"] }
78+
sysinfo = { version = "0.31.2", default-features = false, optional = true, features = [
79+
"system",
80+
] }
6781

6882
[target.'cfg(windows)'.dependencies.junction]
6983
version = "1.0.0"

0 commit comments

Comments
 (0)