summaryrefslogtreecommitdiff
path: root/zjit
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2025-02-12 20:48:41 -0500
committerTakashi Kokubun <takashikkbn@gmail.com>2025-04-18 21:52:58 +0900
commit3f68bcdeb129ba4daa23b4920f26693afa8af4df (patch)
tree465a34608f770a25f68a799a961a4b79a65bbc5b /zjit
parent5925903e38292d9ae0a86a21bae0b865c07763d7 (diff)
Explain libminiruby
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13131
Diffstat (limited to 'zjit')
-rw-r--r--zjit/zjit.mk11
1 files changed, 6 insertions, 5 deletions
diff --git a/zjit/zjit.mk b/zjit/zjit.mk
index 604c769039..15fdbca938 100644
--- a/zjit/zjit.mk
+++ b/zjit/zjit.mk
@@ -119,13 +119,14 @@ zjit-test: libminiruby.a
CARGO_TARGET_DIR='$(ZJIT_CARGO_TARGET_DIR)' \
$(CARGO) nextest run --manifest-path '$(top_srcdir)/zjit/Cargo.toml'
-# A library for booting miniruby in tests. TODO(alan) Explain why not use libruby-static.a
-# - more complex linking
-# - init uses install path baked in, so complexity to deal with this pre-`make install`
+# A library for booting miniruby in tests.
+# Why not use libruby-static.a for this?
+# - Initialization of the full ruby involves dynamic linking for e.g. transcoding implementations
+# our tests don't need these functionalities so good to avoid their complexity.
+# - By being mini, it's faster to build
+# - Less likely to break since later stages of the build process also rely on miniruby.
libminiruby.a: miniruby$(EXEEXT)
$(ECHO) linking static-library $@
- echo exe $(EXE_LDFLAGS)
- echo ld $(LDFLAGS)
$(Q) $(AR) $(ARFLAGS) $@ $(MINIOBJS) $(COMMONOBJS)
libminiruby: libminiruby.a