Skip to content

Commit 8b305b9

Browse files
committed
refactor
1 parent b90feed commit 8b305b9

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

compiler/src/import.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ impl Compiler {
192192
}
193193

194194
pub(crate) fn object_file_extension(&self) -> &'static str {
195-
"o"
195+
if cfg!(target_os = "windows") {
196+
"obj"
197+
} else {
198+
"o"
199+
}
196200
}
197201
}

compiler/src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::ptr::null_mut;
22

33
use ast::{
4-
ast::{integer_literal_as_value, sub_packages_as_string, FromPackage, Identifier},
4+
ast::{integer_literal_as_value, sub_packages_as_string, FromPackage},
55
token::TokenKind,
66
};
77
use gccjit_sys::*;

examples/main.cyr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ import std::io;
22

33
pub fn main() {
44
std::io::printf("Hello World\n");
5+
std::io::printf("Hello World\n");
6+
std::io::printf("Hello World\n");
57
}

0 commit comments

Comments
 (0)