mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
integrate jemalloc into the build
This commit is contained in:
parent
cff203ef76
commit
933897c5f5
3
configure
vendored
3
configure
vendored
@ -683,7 +683,8 @@ do
|
|||||||
for i in \
|
for i in \
|
||||||
isaac linenoise sync test \
|
isaac linenoise sync test \
|
||||||
arch/i386 arch/x86_64 arch/arm arch/mips \
|
arch/i386 arch/x86_64 arch/arm arch/mips \
|
||||||
libuv libuv/src/ares libuv/src/eio libuv/src/ev
|
libuv libuv/src/ares libuv/src/eio libuv/src/ev \
|
||||||
|
jemalloc
|
||||||
do
|
do
|
||||||
make_dir rt/$t/stage$s/$i
|
make_dir rt/$t/stage$s/$i
|
||||||
done
|
done
|
||||||
|
15
mk/rt.mk
15
mk/rt.mk
@ -97,18 +97,23 @@ RUNTIME_S_$(1)_$(2) := rt/arch/$$(HOST_$(1))/_context.S \
|
|||||||
ifeq ($$(CFG_WINDOWSY_$(1)), 1)
|
ifeq ($$(CFG_WINDOWSY_$(1)), 1)
|
||||||
LIBUV_OSTYPE_$(1)_$(2) := win
|
LIBUV_OSTYPE_$(1)_$(2) := win
|
||||||
LIBUV_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/libuv/libuv.a
|
LIBUV_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/libuv/libuv.a
|
||||||
|
JEMALLOC_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/jemalloc/lib/libjemalloc_pic.a
|
||||||
else ifeq ($(OSTYPE_$(1)), apple-darwin)
|
else ifeq ($(OSTYPE_$(1)), apple-darwin)
|
||||||
LIBUV_OSTYPE_$(1)_$(2) := mac
|
LIBUV_OSTYPE_$(1)_$(2) := mac
|
||||||
LIBUV_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/libuv/libuv.a
|
LIBUV_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/libuv/libuv.a
|
||||||
|
JEMALLOC_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/jemalloc/lib/libjemalloc_pic.a
|
||||||
else ifeq ($(OSTYPE_$(1)), unknown-freebsd)
|
else ifeq ($(OSTYPE_$(1)), unknown-freebsd)
|
||||||
LIBUV_OSTYPE_$(1)_$(2) := unix/freebsd
|
LIBUV_OSTYPE_$(1)_$(2) := unix/freebsd
|
||||||
LIBUV_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/libuv/libuv.a
|
LIBUV_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/libuv/libuv.a
|
||||||
|
JEMALLOC_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/jemalloc/lib/libjemalloc_pic.a
|
||||||
else ifeq ($(OSTYPE_$(1)), linux-androideabi)
|
else ifeq ($(OSTYPE_$(1)), linux-androideabi)
|
||||||
LIBUV_OSTYPE_$(1)_$(2) := unix/android
|
LIBUV_OSTYPE_$(1)_$(2) := unix/android
|
||||||
LIBUV_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/libuv/libuv.a
|
LIBUV_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/libuv/libuv.a
|
||||||
|
JEMALLOC_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/jemalloc/lib/libjemalloc_pic.a
|
||||||
else
|
else
|
||||||
LIBUV_OSTYPE_$(1)_$(2) := unix/linux
|
LIBUV_OSTYPE_$(1)_$(2) := unix/linux
|
||||||
LIBUV_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/libuv/libuv.a
|
LIBUV_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/libuv/libuv.a
|
||||||
|
JEMALLOC_LIB_$(1)_$(2) := rt/$(1)/stage$(2)/jemalloc/lib/libjemalloc_pic.a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
RUNTIME_DEF_$(1)_$(2) := rt/rustrt$(CFG_DEF_SUFFIX_$(1))
|
RUNTIME_DEF_$(1)_$(2) := rt/rustrt$(CFG_DEF_SUFFIX_$(1))
|
||||||
@ -124,8 +129,6 @@ ALL_OBJ_FILES += $$(RUNTIME_OBJS_$(1)_$(2))
|
|||||||
MORESTACK_OBJ_$(1)_$(2) := rt/$(1)/stage$(2)/arch/$$(HOST_$(1))/morestack.o
|
MORESTACK_OBJ_$(1)_$(2) := rt/$(1)/stage$(2)/arch/$$(HOST_$(1))/morestack.o
|
||||||
ALL_OBJ_FILES += $$(MORESTACK_OBJS_$(1)_$(2))
|
ALL_OBJ_FILES += $$(MORESTACK_OBJS_$(1)_$(2))
|
||||||
|
|
||||||
RUNTIME_LIBS_$(1)_$(2) := $$(LIBUV_LIB_$(1)_$(2))
|
|
||||||
|
|
||||||
rt/$(1)/stage$(2)/%.o: rt/%.cpp $$(MKFILE_DEPS)
|
rt/$(1)/stage$(2)/%.o: rt/%.cpp $$(MKFILE_DEPS)
|
||||||
@$$(call E, compile: $$@)
|
@$$(call E, compile: $$@)
|
||||||
$$(Q)$$(call CFG_COMPILE_CXX_$(1), $$@, $$(RUNTIME_INCS_$(1)_$(2)) \
|
$$(Q)$$(call CFG_COMPILE_CXX_$(1), $$@, $$(RUNTIME_INCS_$(1)_$(2)) \
|
||||||
@ -146,11 +149,10 @@ rt/$(1)/stage$(2)/arch/$$(HOST_$(1))/libmorestack.a: $$(MORESTACK_OBJ_$(1)_$(2))
|
|||||||
$$(Q)$(AR_$(1)) rcs $$@ $$<
|
$$(Q)$(AR_$(1)) rcs $$@ $$<
|
||||||
|
|
||||||
rt/$(1)/stage$(2)/$(CFG_RUNTIME_$(1)): $$(RUNTIME_OBJS_$(1)_$(2)) $$(MKFILE_DEPS) \
|
rt/$(1)/stage$(2)/$(CFG_RUNTIME_$(1)): $$(RUNTIME_OBJS_$(1)_$(2)) $$(MKFILE_DEPS) \
|
||||||
$$(RUNTIME_DEF_$(1)_$(2)) \
|
$$(RUNTIME_DEF_$(1)_$(2)) $$(LIBUV_LIB_$(1)_$(2)) $$(JEMALLOC_LIB_$(1)_$(2))
|
||||||
$$(RUNTIME_LIBS_$(1)_$(2))
|
|
||||||
@$$(call E, link: $$@)
|
@$$(call E, link: $$@)
|
||||||
$$(Q)$$(call CFG_LINK_CXX_$(1),$$@, $$(RUNTIME_OBJS_$(1)_$(2)) \
|
$$(Q)$$(call CFG_LINK_CXX_$(1),$$@, $$(RUNTIME_OBJS_$(1)_$(2)) \
|
||||||
$$(CFG_GCCISH_POST_LIB_FLAGS_$(1)) $$(RUNTIME_LIBS_$(1)_$(2)) \
|
$$(JEMALLOC_LIB_$(1)_$(2)) $$(CFG_GCCISH_POST_LIB_FLAGS_$(1)) $$(LIBUV_LIB_$(1)_$(2)) \
|
||||||
$$(CFG_LIBUV_LINK_FLAGS_$(1)),$$(RUNTIME_DEF_$(1)_$(2)),$$(CFG_RUNTIME_$(1)))
|
$$(CFG_LIBUV_LINK_FLAGS_$(1)),$$(RUNTIME_DEF_$(1)_$(2)),$$(CFG_RUNTIME_$(1)))
|
||||||
|
|
||||||
# FIXME: For some reason libuv's makefiles can't figure out the
|
# FIXME: For some reason libuv's makefiles can't figure out the
|
||||||
@ -199,6 +201,9 @@ $$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS)
|
|||||||
V=$$(VERBOSE)
|
V=$$(VERBOSE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
$$(JEMALLOC_LIB_$(1)_$(2)):
|
||||||
|
cd $$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/jemalloc; $(S)src/rt/jemalloc/configure --disable-experimental
|
||||||
|
$$(Q)$$(MAKE) -C $$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/jemalloc
|
||||||
|
|
||||||
# These could go in rt.mk or rustllvm.mk, they're needed for both.
|
# These could go in rt.mk or rustllvm.mk, they're needed for both.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user