Skip to content

Commit 2b533e6

Browse files
bootstrap: Only add rustc_randomized_layouts if the crate has it
1 parent 13400c2 commit 2b533e6

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

library/Cargo.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ name = "proc_macro"
235235
version = "0.0.0"
236236
dependencies = [
237237
"core",
238+
"rustc-literal-escaper",
238239
"std",
239240
]
240241

@@ -310,6 +311,10 @@ dependencies = [
310311
"rustc-std-workspace-core",
311312
]
312313

314+
[[package]]
315+
name = "rustc-literal-escaper"
316+
version = "0.0.1"
317+
313318
[[package]]
314319
name = "rustc-std-workspace-alloc"
315320
version = "1.99.0"

library/proc_macro/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ std = { path = "../std" }
99
# `core` when resolving doc links. Without this line a different `core` will be
1010
# loaded from sysroot causing duplicate lang items and other similar errors.
1111
core = { path = "../core" }
12-
rustc-literal-escaper = "0.0.1"
12+
rustc-literal-escaper = { version = "0.0.2", features = ["rustc-dep-of-std"] }

library/proc_macro/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#![feature(panic_can_unwind)]
2828
#![feature(restricted_std)]
2929
#![feature(rustc_attrs)]
30+
#![feature(stmt_expr_attributes)]
3031
#![feature(extend_one)]
3132
#![recursion_limit = "256"]
3233
#![allow(internal_features)]

src/bootstrap/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ impl Build {
748748
features.push("llvm");
749749
}
750750
// keep in sync with `bootstrap/compile.rs:rustc_cargo_env`
751-
if self.config.rust_randomize_layout {
751+
if self.config.rust_randomize_layout && check("rustc_randomized_layouts") {
752752
features.push("rustc_randomized_layouts");
753753
}
754754

0 commit comments

Comments
 (0)