Skip to content

Commit 7ac7b4c

Browse files
committed
./x miri: fix sysroot build
1 parent 3a9bc76 commit 7ac7b4c

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

Diff for: library/std/src/collections/hash/map.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ use crate::ops::Index;
210210
/// As explained above, `HashMap` is randomly seeded: each `HashMap` instance uses a different seed,
211211
/// which means that `HashMap::new` cannot be used in const context. To construct a `HashMap` in the
212212
/// initializer of a `const` or `static` item, you will have to use a different hasher that does not
213-
/// involve a random seed, as demonstrated in the following example. **`HashMap` constructed this
214-
/// way are not resistant against HashDoS!**
213+
/// involve a random seed, as demonstrated in the following example. **A `HashMap` constructed this
214+
/// way is not resistant against HashDoS!**
215215
///
216216
/// ```rust
217217
/// use std::collections::HashMap;

Diff for: library/std/src/collections/hash/set.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ use crate::ops::{BitAnd, BitOr, BitXor, Sub};
107107
/// Like `HashMap`, `HashSet` is randomly seeded: each `HashSet` instance uses a different seed,
108108
/// which means that `HashSet::new` cannot be used in const context. To construct a `HashSet` in the
109109
/// initializer of a `const` or `static` item, you will have to use a different hasher that does not
110-
/// involve a random seed, as demonstrated in the following example. **`HashSet` constructed this
111-
/// way are not resistant against HashDoS!**
110+
/// involve a random seed, as demonstrated in the following example. **A `HashSet` constructed this
111+
/// way is not resistant against HashDoS!**
112112
///
113113
/// ```rust
114114
/// use std::collections::HashSet;

Diff for: src/bootstrap/src/core/build_steps/test.rs

+4
Original file line numberDiff line numberDiff line change
@@ -2756,6 +2756,10 @@ impl Step for Crate {
27562756
// `lib.rs` file, and a `lib.miri.rs` file exists in the same folder, we build that
27572757
// instead. But crucially we only do that for the library, not the test builds.
27582758
cargo.env("MIRI_REPLACE_LIBRS_IF_NOT_TEST", "1");
2759+
// std needs to be built with `-Zforce-unstable-if-unmarked`. For some reason the builder
2760+
// does not set this directly, but relies on the rustc wrapper to set it, and we are not using
2761+
// the wrapper -- hence we have to set it ourselves.
2762+
cargo.rustflag("-Zforce-unstable-if-unmarked");
27592763
cargo
27602764
} else {
27612765
// Also prepare a sysroot for the target.

0 commit comments

Comments
 (0)