mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-04-19 16:04:44 +00:00
zoc: Default output type
This commit is contained in:
parent
1787835bcc
commit
87b30a6604
1 changed files with 3 additions and 5 deletions
|
@ -26,10 +26,7 @@ pub struct Options {
|
|||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
let opts = options().run();
|
||||
|
||||
let output_type = match opts.output_type {
|
||||
Some(t) => t,
|
||||
None => OutputType::Elf,
|
||||
};
|
||||
let output_type = opts.output_type.unwrap_or_default();
|
||||
|
||||
match output_type {
|
||||
OutputType::LlvmIrLinked | OutputType::Assembly => todo!(),
|
||||
|
@ -125,7 +122,7 @@ fn write_to_file(content: &[u8], path: &Path) -> io::Result<()> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[derive(Bpaf, Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Bpaf, Clone, Copy, Debug, Default, PartialEq)]
|
||||
enum OutputType {
|
||||
/// Produce pre-linked LLVM IR
|
||||
#[bpaf(long("ll"))]
|
||||
|
@ -134,6 +131,7 @@ enum OutputType {
|
|||
#[bpaf(long("linked-ll"))]
|
||||
LlvmIrLinked,
|
||||
/// Produce ELF binary (default)
|
||||
#[default]
|
||||
Elf,
|
||||
/// Produce assembly
|
||||
#[bpaf(long("asm"))]
|
||||
|
|
Loading…
Add table
Reference in a new issue