mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-04-28 21:47:57 +03: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>> {
|
fn main() -> Result<(), Box<dyn Error>> {
|
||||||
let opts = options().run();
|
let opts = options().run();
|
||||||
|
|
||||||
let output_type = match opts.output_type {
|
let output_type = opts.output_type.unwrap_or_default();
|
||||||
Some(t) => t,
|
|
||||||
None => OutputType::Elf,
|
|
||||||
};
|
|
||||||
|
|
||||||
match output_type {
|
match output_type {
|
||||||
OutputType::LlvmIrLinked | OutputType::Assembly => todo!(),
|
OutputType::LlvmIrLinked | OutputType::Assembly => todo!(),
|
||||||
|
@ -125,7 +122,7 @@ fn write_to_file(content: &[u8], path: &Path) -> io::Result<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Bpaf, Clone, Copy, Debug, PartialEq)]
|
#[derive(Bpaf, Clone, Copy, Debug, Default, PartialEq)]
|
||||||
enum OutputType {
|
enum OutputType {
|
||||||
/// Produce pre-linked LLVM IR
|
/// Produce pre-linked LLVM IR
|
||||||
#[bpaf(long("ll"))]
|
#[bpaf(long("ll"))]
|
||||||
|
@ -134,6 +131,7 @@ enum OutputType {
|
||||||
#[bpaf(long("linked-ll"))]
|
#[bpaf(long("linked-ll"))]
|
||||||
LlvmIrLinked,
|
LlvmIrLinked,
|
||||||
/// Produce ELF binary (default)
|
/// Produce ELF binary (default)
|
||||||
|
#[default]
|
||||||
Elf,
|
Elf,
|
||||||
/// Produce assembly
|
/// Produce assembly
|
||||||
#[bpaf(long("asm"))]
|
#[bpaf(long("asm"))]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue