Skip to content

Commit

Permalink
create-exe: list supported cross-compilation target triples in help …
Browse files Browse the repository at this point in the history
…text

 Closes #3087
  • Loading branch information
epilys committed Aug 11, 2022
1 parent fcf476e commit 500a6a0
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
24 changes: 24 additions & 0 deletions lib/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ enum WasmerCLIOptions {
/// $ file qjs.exe
/// qjs.exe: ELF 64-bit LSB pie executable, x86-64 ...
/// ```
///
/// ## Cross-compilation
///
/// Accepted target triple values must follow the
/// ['target_lexicon'](https://crates.io/crates/target-lexicon) crate format.
///
/// The recommended targets we try to support are:
///
/// - "x86_64-linux-gnu"
/// - "aarch64-linux-gnu"
/// - "x86_64-apple-darwin"
/// - "arm64-apple-darwin"
#[cfg(any(feature = "static-artifact-create", feature = "wasmer-artifact-create"))]
#[clap(name = "create-exe", verbatim_doc_comment)]
CreateExe(CreateExe),
Expand All @@ -93,6 +105,18 @@ enum WasmerCLIOptions {
/// $ file qjs.obj
/// qjs.obj: ELF 64-bit LSB relocatable, x86-64 ...
/// ```
///
/// ## Cross-compilation
///
/// Accepted target triple values must follow the
/// ['target_lexicon'](https://crates.io/crates/target-lexicon) crate format.
///
/// The recommended targets we try to support are:
///
/// - "x86_64-linux-gnu"
/// - "aarch64-linux-gnu"
/// - "x86_64-apple-darwin"
/// - "arm64-apple-darwin"
#[cfg(feature = "static-artifact-create")]
#[structopt(name = "create-obj", verbatim_doc_comment)]
CreateObj(CreateObj),
Expand Down
10 changes: 10 additions & 0 deletions lib/cli/src/commands/create_exe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ pub struct CreateExe {
output: PathBuf,

/// Compilation Target triple
///
/// Accepted target triple values must follow the
/// ['target_lexicon'](https://crates.io/crates/target-lexicon) crate format.
///
/// The recommended targets we try to support are:
///
/// - "x86_64-linux-gnu"
/// - "aarch64-linux-gnu"
/// - "x86_64-apple-darwin"
/// - "arm64-apple-darwin"
#[clap(long = "target")]
target_triple: Option<Triple>,

Expand Down
10 changes: 10 additions & 0 deletions lib/cli/src/commands/create_obj.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ pub struct CreateObj {
header_output: Option<PathBuf>,

/// Compilation Target triple
///
/// Accepted target triple values must follow the
/// ['target_lexicon'](https://crates.io/crates/target-lexicon) crate format.
///
/// The recommended targets we try to support are:
///
/// - "x86_64-linux-gnu"
/// - "aarch64-linux-gnu"
/// - "x86_64-apple-darwin"
/// - "arm64-apple-darwin"
#[clap(long = "target")]
target_triple: Option<Triple>,

Expand Down

0 comments on commit 500a6a0

Please sign in to comment.