bootstrap: Only add rustc_randomized_layouts if the crate has it
This commit is contained in:
parent
13400c2c10
commit
2b533e6b49
4 changed files with 8 additions and 2 deletions
|
|
@ -235,6 +235,7 @@ name = "proc_macro"
|
|||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"core",
|
||||
"rustc-literal-escaper",
|
||||
"std",
|
||||
]
|
||||
|
||||
|
|
@ -310,6 +311,10 @@ dependencies = [
|
|||
"rustc-std-workspace-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc-literal-escaper"
|
||||
version = "0.0.1"
|
||||
|
||||
[[package]]
|
||||
name = "rustc-std-workspace-alloc"
|
||||
version = "1.99.0"
|
||||
|
|
|
|||
|
|
@ -9,4 +9,4 @@ std = { path = "../std" }
|
|||
# `core` when resolving doc links. Without this line a different `core` will be
|
||||
# loaded from sysroot causing duplicate lang items and other similar errors.
|
||||
core = { path = "../core" }
|
||||
rustc-literal-escaper = "0.0.1"
|
||||
rustc-literal-escaper = { version = "0.0.2", features = ["rustc-dep-of-std"] }
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#![feature(panic_can_unwind)]
|
||||
#![feature(restricted_std)]
|
||||
#![feature(rustc_attrs)]
|
||||
#![feature(stmt_expr_attributes)]
|
||||
#![feature(extend_one)]
|
||||
#![recursion_limit = "256"]
|
||||
#![allow(internal_features)]
|
||||
|
|
|
|||
|
|
@ -748,7 +748,7 @@ impl Build {
|
|||
features.push("llvm");
|
||||
}
|
||||
// keep in sync with `bootstrap/compile.rs:rustc_cargo_env`
|
||||
if self.config.rust_randomize_layout {
|
||||
if self.config.rust_randomize_layout && check("rustc_randomized_layouts") {
|
||||
features.push("rustc_randomized_layouts");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue