Skip to content

Commit

Permalink
jule: all programs have 8MB stack-size platform-independently
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Aug 18, 2024
1 parent 6fea8b6 commit a39e814
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/julec/compile.jule
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ use types for std::jule::types
use std::process::{ProcessError, Cmd}
use strings for std::strings::{StrBuilder}

// Default stack size of Jule programs.
const StackSize = "0x800000"

static mut OutDir = "dist"
static mut OutName = "ir.cpp"
static mut Out = ""
Expand Down Expand Up @@ -105,9 +108,12 @@ fn isCppSourceFile(path: str): bool {
}

fn pushCompCmdClang(mut &cmd: StrBuilder) {
cmd.WriteStr(`-Wl,-stack_size,` + StackSize + " ")

// Disable all warnings.
cmd.WriteStr("-Wno-everything ")


// Set C++ standard.
cmd.WriteStr("--std=")
match env::CppStd {
Expand All @@ -131,6 +137,8 @@ fn pushCompCmdClang(mut &cmd: StrBuilder) {
}

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

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

Expand Down

0 comments on commit a39e814

Please sign in to comment.