Skip to content

Commit b222b6f

Browse files
committed
manifest: only include miri on the nightly channel
miri needs to build std with xargo, which doesn't allow stable/beta: <japaric/xargo#204 (comment)> Therefore, at this time there's no point in making miri available on any but the nightly channel. If we get a stable way to build `std`, like [RFC 2663], then we can re-evaluate whether to start including miri, perhaps still as `miri-preview`. [RFC 2663]: rust-lang/rfcs#2663
1 parent e782d79 commit b222b6f

File tree

1 file changed

+7
-1
lines changed
  • src/tools/build-manifest/src

1 file changed

+7
-1
lines changed

src/tools/build-manifest/src/main.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -522,12 +522,18 @@ impl Builder {
522522
pkgname: &str,
523523
dst: &mut BTreeMap<String, Package>,
524524
targets: &[&str]) {
525-
let (version, is_present) = self.cached_version(pkgname)
525+
let (version, mut is_present) = self.cached_version(pkgname)
526526
.as_ref()
527527
.cloned()
528528
.map(|version| (version, true))
529529
.unwrap_or_default();
530530

531+
// miri needs to build std with xargo, which doesn't allow stable/beta:
532+
// <https://github.com/japaric/xargo/pull/204#issuecomment-374888868>
533+
if pkgname == "miri-preview" && self.rust_release != "nightly" {
534+
is_present = false; // ignore it
535+
}
536+
531537
let targets = targets.iter().map(|name| {
532538
if is_present {
533539
let filename = self.filename(pkgname, name);

0 commit comments

Comments
 (0)