Skip to content

Commit

Permalink
compiler: fix integer wrap around behavior might compile with undefin…
Browse files Browse the repository at this point in the history
…ed behavior
  • Loading branch information
mertcandav committed Feb 25, 2025
1 parent 0e6d1bd commit d7e2928
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/julec/compile.jule
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ fn pushCompCmdClang(mut &cmd: strings::Builder) {
cmd.WriteByte(' ')!

if env::Production {
cmd.WriteStr("-fwrapv ")! // Enable wrap around behavior.
cmd.WriteStr("-O3 ")! // Enable all optimizations.
cmd.WriteStr("-flto ")! // Enable LTO.
cmd.WriteStr("-DNDEBUG ")! // Define NDEBUG, turn off assertions.
Expand All @@ -129,6 +130,7 @@ fn pushCompCmdGcc(mut &cmd: strings::Builder) {
cmd.WriteByte(' ')!

if env::Production {
cmd.WriteStr("-fwrapv ")! // Enable wrap around behavior.
cmd.WriteStr("-O3 ")! // Enable all optimizations.
cmd.WriteStr("-DNDEBUG ")! // Define NDEBUG, turn off assertions.
cmd.WriteStr("-fomit-frame-pointer ")! // Do not use frame pointer.
Expand Down

0 comments on commit d7e2928

Please sign in to comment.