Skip to content

Commit

Permalink
Support macos
Browse files Browse the repository at this point in the history
  • Loading branch information
Computer Science Classes authored and Computer Science Classes committed Jan 8, 2019
1 parent 9dbe219 commit 28fe16a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ pub fn generate_function(function: &FunctionDeclaration, outer_scope: &VariableM
let mut stack_index = -4isize; // ESP - 4

if name == "main" {
if cfg!(target_os = "linux") {
if cfg!(target_os = "linux") || cfg!(target_os = "macos") {
output.push_str(&format!(" .globl main\nmain:\n"));
} else if cfg!(target_os = "windows") {
output.push_str(&format!(" .globl _main\n_main:\n"));
Expand Down

0 comments on commit 28fe16a

Please sign in to comment.