From b64a52df42feeb4fa59d11b19568e2aba5ef9e65 Mon Sep 17 00:00:00 2001 From: Rob Arnold Date: Tue, 14 Jun 2011 08:28:10 -0700 Subject: [PATCH] Integrate libuv into the build system --- mk/rt.mk | 13 +++++++++---- src/rt/libuv/LIBUV_REVISION | 5 +++++ 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 src/rt/libuv/LIBUV_REVISION diff --git a/mk/rt.mk b/mk/rt.mk index 532483cdf31a..8f6f96b17e83 100644 --- a/mk/rt.mk +++ b/mk/rt.mk @@ -65,9 +65,9 @@ RUNTIME_HDR := rt/globals.h \ RUNTIME_DEF := rt/rustrt$(CFG_DEF_SUFFIX) RUNTIME_INCS := -I $(S)src/rt/isaac -I $(S)src/rt/uthash \ - -I $(S)src/rt/arch/i386 + -I $(S)src/rt/arch/i386 -I $(S)src/rt/libuv RUNTIME_OBJS := $(RUNTIME_CS:.cpp=.o) $(RUNTIME_LL:.ll=.o) $(RUNTIME_S:.s=.o) -RUNTIME_LIBS := $(CFG_GCCISH_POST_LIB_FLAGS) +RUNTIME_LIBS := $(S)src/rt/libuv/uv.a rt/%.o: rt/%.cpp $(MKFILES) @@ -92,9 +92,14 @@ rt/%.o: rt/%.ll $(MKFILES) @$(call E, llc: $@) $(Q)$(LLC) -filetype=obj -relocation-model=pic -march=x86 -o $@ $< -rt/$(CFG_RUNTIME): $(RUNTIME_OBJS) $(MKFILES) $(RUNTIME_HDR) $(RUNTIME_DEF) +rt/$(CFG_RUNTIME): $(RUNTIME_OBJS) $(MKFILES) $(RUNTIME_HDR) $(RUNTIME_DEF) $(RUNTIME_LIBS) @$(call E, link: $@) - $(Q)$(call CFG_LINK_C,$@,$(RUNTIME_LIBS) $(RUNTIME_OBJS),$(RUNTIME_DEF)) + $(Q)$(call CFG_LINK_C,$@,$(CFG_GCCISH_POST_LIB_FLAGS) $(RUNTIME_LIBS) $(RUNTIME_OBJS),$(RUNTIME_DEF)) + +$(S)src/rt/libuv/uv.a: rt/libuv/LIBUV_REVISION + $(Q)$(MAKE) -C $(S)src/rt/libuv CFLAGS=\"-m32\" LDFLAGS=\"-m32\" + $(Q)mkdir -p rt/libuv + $(Q)cp $(S)src/rt/libuv/uv.a rt/libuv/uv.a # These could go in rt.mk or rustllvm.mk, they're needed for both. diff --git a/src/rt/libuv/LIBUV_REVISION b/src/rt/libuv/LIBUV_REVISION new file mode 100644 index 000000000000..21c156e1dd0d --- /dev/null +++ b/src/rt/libuv/LIBUV_REVISION @@ -0,0 +1,5 @@ +This subtree is pulled from: +2b5707d834a6b85b8e589ac04cb61a6db2dab94b + +When pulling in a new version of libuv, please update this file to ensure that +everyone correctly rebuilds libuv.