Skip to content

Commit

Permalink
compiler: minor fixes for stack size handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Aug 18, 2024
1 parent 06b0226 commit 3334847
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/julec/compile.jule
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ fn isCppSourceFile(path: str): bool {
}

fn pushCompCmdClang(mut &cmd: StrBuilder) {
cmd.WriteStr(`-Wl,-stack_size,` + StackSize + " ")
match build::Os {
| build::DistOs.Darwin:
cmd.WriteStr(`-Wl,-stack_size,` + StackSize + " ")
|:
cmd.WriteStr(`-Wl,-z,stack-size=` + StackSize + " ")
}

// Disable all warnings.
cmd.WriteStr("-Wno-everything ")
Expand Down Expand Up @@ -137,7 +142,7 @@ fn pushCompCmdClang(mut &cmd: StrBuilder) {
}

fn pushCompCmdGcc(mut &cmd: StrBuilder) {
cmd.WriteStr(`-Wl,--stack,` + StackSize + " ")
cmd.WriteStr(`-Wl,-z,stack-size=` + StackSize + ` `)

// Disable all warnings.
cmd.WriteStr("-w ")
Expand Down

0 comments on commit 3334847

Please sign in to comment.