Skip to content

profile-rustflags vs stable in toolchain/miri-script #3863

Closed
@DeSevilla

Description

@DeSevilla

I'm building Miri for the first time on Windows according to the instructions here. I've installed rustup-toolchain-install-master, but by default, running './miri toolchain' in order to install the right version of Rust gives me the following error message:

The package requires the Cargo feature called `profile-rustflags`, but that feature is not stabilized in this version of Cargo (1.81.0 (2dbb1af80 2024-08-20)).
  Consider trying a newer version of Cargo (this may require the nightly release).
  See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#profile-rustflags-option for more information about the status of this feature.
Failed to build miri-script. Is the 'stable' toolchain installed?

The culprit here appears to be this line in miri.bat, which calls "cargo +stable".

cargo +stable build %CARGO_EXTRA_FLAGS% -q --target-dir %MIRI_SCRIPT_TARGET_DIR% --manifest-path %0\..\miri-script\Cargo.toml ^

Changing it to "+nightly" lets me build and run Miri successfully. The +stable was introduced in #3402, to fix an inability to build miri-script in case of an error, so just removing "+stable" might not be the best way to solve this in general. Is it possible to build miri-script on stable without requiring profile-rustflags?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions