Skip to content

Commit

Permalink
Document --target option (#269)
Browse files Browse the repository at this point in the history
Resolves #267.
  • Loading branch information
vi authored Jan 26, 2025
1 parent e00dabb commit c4516de
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@ OPTIONS:

This flag can only be used together with --feature-powerset flag.

--target <TRIPLE>
Build for specified target triple.

Comma-separated lists of targets are not supported, but you can specify the whole
--target option multiple times to do multiple targets.

This is actually not a cargo-hack option, it is interpreted by Cargo itself.

--mutually-exclusive-features <FEATURES>...
Space or comma separated list of features to not use together.

Expand Down
4 changes: 4 additions & 0 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,10 @@ const HELP: &[HelpText<'_>] = &[
--group-features c,d`",
"This flag can only be used together with --feature-powerset flag.",
]),
("", "--target", "<TRIPLE>", "Build for specified target triple", &[
"Comma-separated lists of targets are not supported, but you can specify the whole --target option multiple times to do multiple targets.",
"This is actually not a cargo-hack option, it is interpreted by Cargo itself.",
]),
("", "--mutually-exclusive-features", "<FEATURES>...", "Space or comma separated list of features to not use together", &[
"To specify multiple groups, use this option multiple times: `--mutually-exclusive-features \
a,b --mutually-exclusive-features c,d`",
Expand Down
8 changes: 8 additions & 0 deletions tests/long-help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ OPTIONS:

This flag can only be used together with --feature-powerset flag.

--target <TRIPLE>
Build for specified target triple.

Comma-separated lists of targets are not supported, but you can specify the whole
--target option multiple times to do multiple targets.

This is actually not a cargo-hack option, it is interpreted by Cargo itself.

--mutually-exclusive-features <FEATURES>...
Space or comma separated list of features to not use together.

Expand Down
1 change: 1 addition & 0 deletions tests/short-help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ OPTIONS:
--depth <NUM> Specify a max number of simultaneous feature flags of
--feature-powerset
--group-features <FEATURES>... Space or comma separated list of features to group
--target <TRIPLE> Build for specified target triple
--mutually-exclusive-features <FEATURES>... Space or comma separated list of features to not use
together
--at-least-one-of <FEATURES>... Space or comma separated list of features. Skips sets of
Expand Down

0 comments on commit c4516de

Please sign in to comment.