From e97d47d5fb6cfeda5253bc6a89f570033b106ac9 Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Thu, 6 Feb 2025 15:13:25 -0500 Subject: [PATCH] Overflow checks in release profile per tradition --- zjit/Cargo.toml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/zjit/Cargo.toml b/zjit/Cargo.toml index 23f872a470..11cdc333c0 100644 --- a/zjit/Cargo.toml +++ b/zjit/Cargo.toml @@ -8,4 +8,16 @@ publish = false # Don't publish to crates.io [lib] crate-type = ["staticlib"] +[profile.release] +# NOTE: --enable-zjit builds use `rustc` without going through Cargo. You +# might want to update the `rustc` invocation if you change this profile. +opt-level = 3 +# The extra robustness that comes from checking for arithmetic overflow is +# worth the performance cost for the compiler. +overflow-checks = true +# Generate debug info +debug = true +# Use ThinLTO. Much smaller output for a small amount of build time increase. +lto = "thin" + [dependencies]