Skip to content

Commit

Permalink
Add back opt_level
Browse files Browse the repository at this point in the history
  • Loading branch information
branchseer committed May 11, 2021
1 parent 1e9920d commit 1756d0f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libquickjs-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,10 @@ fn main() {
.flag_if_supported("-Wno-cast-function-type")
.flag_if_supported("-Wno-implicit-fallthrough")
.flag_if_supported("-Wno-enum-conversion")
// cc uses the OPT_LEVEL env var by default, but we hardcode it to -O2
// since release builds use -O3 which might be problematic for quickjs,
// and debug builds only happen once anyway so the optimization slowdown
// is fine.
.opt_level(2)
.compile(LIB_NAME);
}

0 comments on commit 1756d0f

Please sign in to comment.