diff options
| author | Madhav Madhusoodanan <f20200049@pilani.bits-pilani.ac.in> | 2025-03-25 21:17:56 +0400 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2025-05-27 23:27:38 +0000 |
| commit | 1d39fd0964cab63dd05d8e31708d4f37ec89e4de (patch) | |
| tree | 633c6b3db6faf2e40c5f597e8dbcac6034af6e2d /library/stdarch/crates/intrinsic-test/src/common/cli.rs | |
| parent | d7edb3ea7c9b813b8794e62a2c1c5078e881e1cb (diff) | |
| download | rust-1d39fd0964cab63dd05d8e31708d4f37ec89e4de.tar.gz rust-1d39fd0964cab63dd05d8e31708d4f37ec89e4de.zip | |
Chore: Added `SupportedArchitectureTest` trait which must be implemented for different architectures.
Next steps: Move the existing ARM-specific implementation into one that fits well with this trait.
Diffstat (limited to 'library/stdarch/crates/intrinsic-test/src/common/cli.rs')
| -rw-r--r-- | library/stdarch/crates/intrinsic-test/src/common/cli.rs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/library/stdarch/crates/intrinsic-test/src/common/cli.rs b/library/stdarch/crates/intrinsic-test/src/common/cli.rs new file mode 100644 index 00000000000..92f0e86e81e --- /dev/null +++ b/library/stdarch/crates/intrinsic-test/src/common/cli.rs @@ -0,0 +1,44 @@ +use std::path::PathBuf; + +/// Intrinsic test tool +#[derive(clap::Parser)] +#[command( + name = "Intrinsic test tool", + about = "Generates Rust and C programs for intrinsics and compares the output" +)] +pub struct Cli { + /// The input file containing the intrinsics + pub input: PathBuf, + + /// The rust toolchain to use for building the rust code + #[arg(long)] + pub toolchain: Option<String>, + + /// The C++ compiler to use for compiling the c++ code + #[arg(long, default_value_t = String::from("clang++"))] + pub cppcompiler: String, + + /// Run the C programs under emulation with this command + #[arg(long)] + pub runner: Option<String>, + + /// Filename for a list of intrinsics to skip (one per line) + #[arg(long)] + pub skip: Option<PathBuf>, + + /// Regenerate test programs, but don't build or run them + #[arg(long)] + pub generate_only: bool, + + /// Pass a target the test suite + #[arg(long, default_value_t = String::from("aarch64-unknown-linux-gnu"))] + pub target: String, + + /// Set the linker + #[arg(long)] + pub linker: Option<String>, + + /// Set the sysroot for the C++ compiler + #[arg(long)] + pub cxx_toolchain_dir: Option<String>, +} |
