Skip to content

Commit

Permalink
build(cargo): disable derive feature of clap when using "+crt-static"…
Browse files Browse the repository at this point in the history
… for static linking

as descripted in clap-rs/clap#1938, following error can be resolved by using
`RUSTFLAGS="-C target-feature=-crt-static"` or disable `derive` feature.
In fact, we don't need the derive feature. Thus, it can be disabled.

Error message when add rust flag `+crt-static` only for static linking:
`cannot produce proc-macro for `clap_derive v3.0.0-beta.2` as the target `x86_64-unknown-linux-gnu` does not support these crate types`
  • Loading branch information
genshen committed Feb 27, 2021
1 parent 119c1a0 commit e89ea19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["genshen <genshenchu@gmail.com>"]
edition = "2018"

[dependencies]
clap = {version = "3.0.0-beta.2", features = ["yaml"]}
clap = {version = "3.0.0-beta.2", default-features = false, features = ["suggestions", "color", "yaml"]}
libc = "0.2"
rayon = "1.5.0"
xyzio = "0.3.1"
Expand Down

0 comments on commit e89ea19

Please sign in to comment.