rust-embedded / cargo-binutils

Cargo subcommands to invoke the LLVM tools shipped with the Rust toolchain
Apache License 2.0
474 stars 41 forks source link

-Z unstable flags not passed to build command #127

Closed teamplayer3 closed 1 year ago

teamplayer3 commented 1 year ago

executed command:

cargo size --release --verbose -Z unstable-options

verbose output:

"/usr/local/rustup/toolchains/nightly-2022-06-15-x86_64-unknown-linux-gnu/bin/cargo" "build" "--release" "--message-format=json"
error: the `--out-dir` flag is unstable, pass `-Z unstable-options` to enable it
See https://github.com/rust-lang/cargo/issues/6790 for more information about the `--out-dir` flag.
error: Failed to parse crate metadata

binutils version:

0.3.6
kleinesfilmroellchen commented 1 year ago

No -Z options are passed to the build command, e.g. -Z build-std which is required for embedded targets like riscv32imc-unknown-none-elf.

EnzoAlbornoz commented 1 year ago

Try use .cargo/config.toml to pass these options E.g:

# <package>/.cargo/config.toml
[unstable]
build-std = ["core", "alloc"]