File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -425,6 +425,7 @@ opt verify-install 1 "verify installed binaries work"
425
425
valopt prefix " /usr/local" " set installation prefix"
426
426
valopt local-rust-root " /usr/local" " set prefix for local rust binary"
427
427
valopt llvm-root " " " set LLVM root"
428
+ valopt jemalloc-root " " " set jemalloc root"
428
429
valopt android-cross-path " /opt/ndk_standalone" " Android NDK standalone path"
429
430
valopt mingw32-cross-path " " " MinGW32 cross compiler path"
430
431
@@ -1198,6 +1199,7 @@ putvar CFG_ANDROID_CROSS_PATH
1198
1199
putvar CFG_MINGW32_CROSS_PATH
1199
1200
putvar CFG_MANDIR
1200
1201
putvar CFG_DISABLE_INJECT_STD_VERSION
1202
+ putvar CFG_JEMALLOC_ROOT
1201
1203
1202
1204
# Avoid spurious warnings from clang by feeding it original source on
1203
1205
# ccache-miss rather than preprocessed input.
Original file line number Diff line number Diff line change 253
253
endif
254
254
JEMALLOC_LIB_$(1 ) := $$(RT_OUTPUT_DIR_$(1 ) ) /$$(JEMALLOC_NAME_$(1 ) )
255
255
JEMALLOC_BUILD_DIR_$(1 ) := $$(RT_OUTPUT_DIR_$(1 ) ) /jemalloc
256
+ JEMALLOC_LOCAL_$(1 ) := $$(JEMALLOC_BUILD_DIR_$(1 ) ) /lib/$$(JEMALLOC_REAL_NAME_$(1 ) )
256
257
257
- $$(JEMALLOC_LIB_ $(1 ) ) : $$(JEMALLOC_DEPS ) $$(MKFILE_DEPS )
258
+ $$(JEMALLOC_LOCAL_ $(1 ) ) : $$(JEMALLOC_DEPS ) $$(MKFILE_DEPS )
258
259
@$$(call E, make: jemalloc)
259
260
cd "$$(JEMALLOC_BUILD_DIR_$(1 ) ) "; "$(S ) src/jemalloc/configure" \
260
261
$$(JEMALLOC_ARGS_$(1 ) ) --enable-cc-silence --with-jemalloc-prefix=je_ \
@@ -265,7 +266,20 @@ $$(JEMALLOC_LIB_$(1)): $$(JEMALLOC_DEPS) $$(MKFILE_DEPS)
265
266
CPPFLAGS="-I $(S ) src/rt/" \
266
267
EXTRA_CFLAGS="$$(CFG_CFLAGS_$(1 ) ) -g1"
267
268
$$(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
269
283
270
284
# ###############################################################################
271
285
# compiler-rt
You can’t perform that action at this time.
0 commit comments