summaryrefslogtreecommitdiff
path: root/yjit
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2022-07-06 22:14:25 -0700
committerJohn Hawthorn <john@hawthorn.email>2022-07-29 16:32:14 -0700
commitfbd24793cb7be2429edafcf11d7dd4a7d11f5c95 (patch)
tree737c3b35c5b52523e6598006716477f36f9cdc38 /yjit
parent53175643ef826775d0a51fc48fdd79a4cf01dc70 (diff)
Add --enable-yjit=stats configure option
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6105
Diffstat (limited to 'yjit')
-rw-r--r--yjit/Cargo.toml3
-rw-r--r--yjit/yjit.mk7
2 files changed, 8 insertions, 2 deletions
diff --git a/yjit/Cargo.toml b/yjit/Cargo.toml
index a5208049cb..c7ff31ec2c 100644
--- a/yjit/Cargo.toml
+++ b/yjit/Cargo.toml
@@ -30,6 +30,9 @@ debug = true
debug-assertions = true
overflow-checks = true
+[profile.stats]
+inherits = "release"
+
[profile.release]
# NOTE: --enable-yjit builds use `rustc` without going through Cargo. You
# might want to update the `rustc` invocation if you change this profile.
diff --git a/yjit/yjit.mk b/yjit/yjit.mk
index eb1f5d1fe1..efd4ff0c40 100644
--- a/yjit/yjit.mk
+++ b/yjit/yjit.mk
@@ -25,13 +25,16 @@ yjit-static-lib-no:
$(ECHO) 'Error: Tried to build YJIT without configuring it first. Check `make showconfig`?'
@false
-yjit-static-lib-dev:
- $(ECHO) 'building Rust YJIT (dev mode)'
+yjit-static-lib-cargo:
+ $(ECHO) 'building Rust YJIT ($(YJIT_SUPPORT) mode)'
$(Q)$(CHDIR) $(top_srcdir)/yjit && \
CARGO_TARGET_DIR='$(CARGO_TARGET_DIR)' \
CARGO_TERM_PROGRESS_WHEN='never' \
$(CARGO) $(CARGO_VERBOSE) build $(CARGO_BUILD_ARGS)
+yjit-static-lib-dev: yjit-static-lib-cargo
+yjit-static-lib-stats: yjit-static-lib-cargo
+
# This PHONY prerequisite makes it so that we always run cargo. When there are
# no Rust changes on rebuild, Cargo does not touch the mtime of the static
# library and GNU make avoids relinking. $(empty) seems to be important to