22 lines
573 B
Rust
22 lines
573 B
Rust
use clap::{Parser, ValueEnum};
|
|
|
|
#[derive(Debug, Parser, Default)]
|
|
pub struct Args {
|
|
/// The output format to assemble to. Currently just ELF or a flat binary.
|
|
#[arg(value_enum)]
|
|
output_format: Option<OutputFormat>,
|
|
/// Whether the relocatable object files should be statically linked into a single
|
|
/// executable or library.
|
|
link: bool,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Copy, ValueEnum, Default)]
|
|
/// The executable format the output should take.
|
|
pub enum OutputFormat {
|
|
/// An ELF file.
|
|
#[default]
|
|
Elf,
|
|
/// A flat binary file.
|
|
Flat,
|
|
}
|