summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2025-02-06 15:13:25 -0500
committerTakashi Kokubun <takashikkbn@gmail.com>2025-04-18 21:52:56 +0900
commite97d47d5fb6cfeda5253bc6a89f570033b106ac9 (patch)
treed182f5058e9c7aced81c03e33db8098979c1d46b
parent2ac7b85ea57a6f3e0252a080687df2874348cee0 (diff)
Overflow checks in release profile per tradition
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13131
-rw-r--r--zjit/Cargo.toml12
1 files changed, 12 insertions, 0 deletions
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]