@@ -45,36 +45,6 @@ $(ZJIT_LIBS): $(ZJIT_SRC_FILES)
4545else
4646endif
4747
48- zjit-libobj : $(ZJIT_LIBOBJ )
49-
50- ZJIT_LIB_SYMBOLS = $(ZJIT_LIBS:.a= ) .symbols
51- $(ZJIT_LIBOBJ ) : $(ZJIT_LIBS )
52- $(ECHO ) ' partial linking $(ZJIT_LIBS) into $@'
53- ifneq ($(findstring darwin,$(target_os ) ) ,)
54- $(Q) $(CC) -nodefaultlibs -r -o $@ -exported_symbols_list $(ZJIT_LIB_SYMBOLS) $(ZJIT_LIBS)
55- else
56- $(Q) $(LD) -r -o $@ --whole-archive $(ZJIT_LIBS)
57- -$(Q) $(OBJCOPY) --wildcard --keep-global-symbol='$(SYMBOL_PREFIX)rb_*' $(@)
58- endif
59-
60- # For Darwin only: a list of symbols that we want the glommed Rust static lib to export.
61- # Unfortunately, using wildcard like '_rb_*' with -exported-symbol does not work, at least
62- # not on version 820.1. Assume llvm-nm, so XCode 8.0 (from 2016) or newer.
63- #
64- # The -exported_symbols_list pulls out the right archive members. Symbols not listed
65- # in the list are made private extern, which are in turn made local as we're using `ld -r`.
66- # Note, section about -keep_private_externs in ld's man page hints at this behavior on which
67- # we rely.
68- ifneq ($(findstring darwin,$(target_os ) ) ,)
69- $(ZJIT_LIB_SYMBOLS ) : $(ZJIT_LIBS )
70- $(Q ) $(tooldir ) /darwin-ar $(NM ) --defined-only --extern-only $(ZJIT_LIBS ) | \
71- sed -n -e ' s/.* //' -e ' /^$(SYMBOL_PREFIX)rb_/p' \
72- -e ' /^$(SYMBOL_PREFIX)rust_eh_personality/p' \
73- > $@
74-
75- $(ZJIT_LIBOBJ ) : $(ZJIT_LIB_SYMBOLS )
76- endif
77-
7848# By using ZJIT_BENCH_OPTS instead of RUN_OPTS, you can skip passing the options to `make install`
7949ZJIT_BENCH_OPTS = $(RUN_OPTS ) --enable-gems
8050ZJIT_BENCH = benchmarks/railsbench/benchmark.rb
0 commit comments