ruby/yjit/not_gmake.mk
Alan Wu 8ad290b4ef YJIT: Fix BSD make build. Remove ZJIT stuff
Thanks to nobu for pointing this out. This is a YJIT file so shouldn't
have ZJIT stuff in it. ZJIT doesn't support building on BSDs yet.

Fix: 92b218fbc379fe85792eb060b71520e271971335
2025-08-21 16:38:25 -04:00

19 lines
619 B
Makefile

# This file is included into the Makefile when
# we're *not* using GNU make. Stick to basic features.
# Rebuild every time since we don't want to list Rust source
# file dependencies.
.PHONY: yjit-static-lib
$(YJIT_LIBS): yjit-static-lib
$(empty)
yjit-static-lib:
$(ECHO) 'building Rust YJIT (release mode)'
$(Q) $(RUSTC) $(YJIT_RUSTC_ARGS)
# Assume GNU flavor LD and OBJCOPY. Works on FreeBSD 13, at least.
$(RUST_LIBOBJ): $(YJIT_LIBS)
$(ECHO) 'partial linking $(YJIT_LIBS) into $@'
$(Q) $(LD) -r -o $@ --whole-archive $(YJIT_LIBS)
-$(Q) $(OBJCOPY) --wildcard --keep-global-symbol='$(SYMBOL_PREFIX)rb_*' $(@)