summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common.mk1
-rw-r--r--yjit/Cargo.toml2
2 files changed, 3 insertions, 0 deletions
diff --git a/common.mk b/common.mk
index ac627181e0..9dd35eebc2 100644
--- a/common.mk
+++ b/common.mk
@@ -225,6 +225,7 @@ YJIT_RUSTC_ARGS = --crate-name=yjit \
--crate-type=staticlib \
--edition=2021 \
-g \
+ -C lto=thin \
-C opt-level=3 \
-C overflow-checks=on \
'--out-dir=$(CARGO_TARGET_DIR)/release/' \
diff --git a/yjit/Cargo.toml b/yjit/Cargo.toml
index 18b1d10bd8..d2d54edc78 100644
--- a/yjit/Cargo.toml
+++ b/yjit/Cargo.toml
@@ -45,3 +45,5 @@ opt-level = 3
overflow-checks = true
# Generate debug info
debug = true
+# Use ThinLTO. Much smaller output for a small amount of build time increase.
+lto = "thin"