Skip to content

Commit

Permalink
[JIT] Compile minilua with only the needed flags
Browse files Browse the repository at this point in the history
Issue #999 seems to be avoidable mostly by restricting minilua to
compile with just the libraries that it needs, rather than all that
MoarVM brings in. Or thats' my theory at least.
Removes the always-recompile behaviour, which was annoying me.
  • Loading branch information
bdw committed Jan 6, 2019
1 parent 4188eb1 commit 5ae8072
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions build/Makefile.in
Expand Up @@ -485,18 +485,16 @@ TOM_OBJECTS = @tomobjects@
THIRDPARTY = @thirdpartylibs@

MINILUA = 3rdparty/dynasm/minilua@exe@
MINILUA_LDFLAGS = -lm
DYNASM = $(MINILUA) 3rdparty/dynasm/dynasm.lua
DYNASM_SCRIPTS = 3rdparty/dynasm/dynasm.lua 3rdparty/dynasm/dasm_x86.lua
DYNASM_HEADERS = 3rdparty/dynasm/dasm_proto.h 3rdparty/dynasm/dasm_x86.h

.SUFFIXES: .c @obj@ .i @asm@ .dasc .expr .tile .h
.PHONY: clean realclean install ALWAYS_REBUILD lib all help test reconfig clangcheck gcccheck libuv tracing cgoto switch no-tracing no-cgoto distclean release sandwich
.PHONY: clean realclean install lib all help test reconfig clangcheck gcccheck libuv tracing cgoto switch no-tracing no-cgoto distclean release sandwich

all: moar@exe@ pkgconfig/moar.pc

# Empty target, just in case our make doesn't support the .PHONY property
ALWAYS_REBUILD:

install: all
$(MKPATH) "$(DESTDIR)$(BINDIR)"
$(CP) moar@exe@ "$(DESTDIR)$(BINDIR)"
Expand Down Expand Up @@ -616,9 +614,9 @@ src/strings/unicode.c: src/strings/unicode_db.c src/strings/unicode_uca.c src/st
$(MSG) generating $@
$(CMD) $(CAT) src/strings/unicode_db.c src/strings/unicode_uca.c src/strings/unicode_ops.c > $@ $(NOERR)

# Always rebuild minilua to workaround issue #999
$(MINILUA): ALWAYS_REBUILD 3rdparty/dynasm/minilua.c
$(CC) $(CFLAGS) $(LDFLAGS) 3rdparty/dynasm/minilua.c -o $@ $(LDLIBS)
# Minilua requires only -lm, no libraries
$(MINILUA): 3rdparty/dynasm/minilua.c
$(CC) $(MINILUA_LDFLAGS) 3rdparty/dynasm/minilua.c -o $@

.dasc.c:
$(MSG) preprocessing $<
Expand Down

0 comments on commit 5ae8072

Please sign in to comment.