Skip to content

Commit 2a76472

Browse files
committed
---
yaml --- r: 117171 b: refs/heads/master c: 145e415 h: refs/heads/master i: 117169: 778c08f 117167: 122e5bc v: v3
1 parent 0dac983 commit 2a76472

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: fce98e5262f5426e80165ff7195fb1548c861f6b
2+
refs/heads/master: 145e415fabd4532f34537d82a4612e5feeccf11c
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: d6736a1440d42f6af967a8a20ab8d73522112b72
55
refs/heads/try: 009d898a9422ac04c1aa60c0e9aff3abc5fa4672

trunk/configure

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ opt verify-install 1 "verify installed binaries work"
425425
valopt prefix "/usr/local" "set installation prefix"
426426
valopt local-rust-root "/usr/local" "set prefix for local rust binary"
427427
valopt llvm-root "" "set LLVM root"
428+
valopt jemalloc-root "" "set jemalloc root"
428429
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
429430
valopt mingw32-cross-path "" "MinGW32 cross compiler path"
430431

@@ -1198,6 +1199,7 @@ putvar CFG_ANDROID_CROSS_PATH
11981199
putvar CFG_MINGW32_CROSS_PATH
11991200
putvar CFG_MANDIR
12001201
putvar CFG_DISABLE_INJECT_STD_VERSION
1202+
putvar CFG_JEMALLOC_ROOT
12011203

12021204
# Avoid spurious warnings from clang by feeding it original source on
12031205
# ccache-miss rather than preprocessed input.

trunk/mk/rt.mk

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,9 @@ else
253253
endif
254254
JEMALLOC_LIB_$(1) := $$(RT_OUTPUT_DIR_$(1))/$$(JEMALLOC_NAME_$(1))
255255
JEMALLOC_BUILD_DIR_$(1) := $$(RT_OUTPUT_DIR_$(1))/jemalloc
256+
JEMALLOC_LOCAL_$(1) := $$(JEMALLOC_BUILD_DIR_$(1))/lib/$$(JEMALLOC_REAL_NAME_$(1))
256257

257-
$$(JEMALLOC_LIB_$(1)): $$(JEMALLOC_DEPS) $$(MKFILE_DEPS)
258+
$$(JEMALLOC_LOCAL_$(1)): $$(JEMALLOC_DEPS) $$(MKFILE_DEPS)
258259
@$$(call E, make: jemalloc)
259260
cd "$$(JEMALLOC_BUILD_DIR_$(1))"; "$(S)src/jemalloc/configure" \
260261
$$(JEMALLOC_ARGS_$(1)) --enable-cc-silence --with-jemalloc-prefix=je_ \
@@ -265,7 +266,20 @@ $$(JEMALLOC_LIB_$(1)): $$(JEMALLOC_DEPS) $$(MKFILE_DEPS)
265266
CPPFLAGS="-I $(S)src/rt/" \
266267
EXTRA_CFLAGS="$$(CFG_CFLAGS_$(1)) -g1"
267268
$$(Q)$$(MAKE) -C "$$(JEMALLOC_BUILD_DIR_$(1))" build_lib_static
268-
$$(Q)cp $$(JEMALLOC_BUILD_DIR_$(1))/lib/$$(JEMALLOC_REAL_NAME_$(1)) $$(JEMALLOC_LIB_$(1))
269+
270+
ifeq ($(1),$$(CFG_BUILD))
271+
ifneq ($$(CFG_JEMALLOC_ROOT),)
272+
$$(JEMALLOC_LIB_$(1)): $$(CFG_JEMALLOC_ROOT)/libjemalloc_pic.a
273+
@$$(call E, copy: jemalloc)
274+
$$(Q)cp $$< $$@
275+
else
276+
$$(JEMALLOC_LIB_$(1)):
277+
$$(Q)cp $$< $$@
278+
endif
279+
else
280+
$$(JEMALLOC_LIB_$(1)):
281+
$$(Q)cp $$< $$@
282+
endif
269283

270284
################################################################################
271285
# compiler-rt

0 commit comments

Comments
 (0)