mk: rewrite make files
This commit is contained in:
parent
d96b483a01
commit
26a5dc593c
125
Makefile.in
125
Makefile.in
|
@ -130,36 +130,43 @@ else
|
|||
CFG_VALGRIND_COMPILE :=
|
||||
endif
|
||||
|
||||
CFG_RUNTIME :=$(call CFG_LIB_NAME,rustrt)
|
||||
CFG_RUSTLLVM :=$(call CFG_LIB_NAME,rustllvm)
|
||||
CFG_CORELIB :=$(call CFG_LIB_NAME,core)
|
||||
CFG_STDLIB :=$(call CFG_LIB_NAME,std)
|
||||
CFG_LIBRUSTC :=$(call CFG_LIB_NAME,rustc)
|
||||
CFG_LIBSYNTAX :=$(call CFG_LIB_NAME,syntax)
|
||||
CFG_LIBFUZZER :=$(call CFG_LIB_NAME,fuzzer)
|
||||
CFG_LIBRUSTPKG :=$(call CFG_LIB_NAME,rustpkg)
|
||||
CFG_LIBRUSTDOC :=$(call CFG_LIB_NAME,rustdoc)
|
||||
CFG_LIBRUSTI :=$(call CFG_LIB_NAME,rusti)
|
||||
CFG_LIBRUST :=$(call CFG_LIB_NAME,rust)
|
||||
define LIBREQ
|
||||
|
||||
STDLIB_GLOB :=$(call CFG_LIB_GLOB,std)
|
||||
CORELIB_GLOB :=$(call CFG_LIB_GLOB,core)
|
||||
LIBRUSTC_GLOB :=$(call CFG_LIB_GLOB,rustc)
|
||||
LIBSYNTAX_GLOB :=$(call CFG_LIB_GLOB,syntax)
|
||||
LIBFUZZER_GLOB :=$(call CFG_LIB_GLOB,fuzzer)
|
||||
LIBRUSTPKG_GLOB :=$(call CFG_LIB_GLOB,rustpkg)
|
||||
LIBRUSTDOC_GLOB :=$(call CFG_LIB_GLOB,rustdoc)
|
||||
LIBRUSTI_GLOB :=$(call CFG_LIB_GLOB,rusti)
|
||||
LIBRUST_GLOB :=$(call CFG_LIB_GLOB,rust)
|
||||
STDLIB_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,std)
|
||||
CORELIB_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,core)
|
||||
LIBRUSTC_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rustc)
|
||||
LIBSYNTAX_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,syntax)
|
||||
LIBFUZZER_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,fuzzer)
|
||||
LIBRUSTPKG_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rustpkg)
|
||||
LIBRUSTDOC_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rustdoc)
|
||||
LIBRUSTI_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rusti)
|
||||
LIBRUST_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rust)
|
||||
CFG_RUNTIME_$(1) :=$(call CFG_LIB_NAME_$(1),rustrt)
|
||||
CFG_RUSTLLVM_$(1) :=$(call CFG_LIB_NAME_$(1),rustllvm)
|
||||
CFG_CORELIB_$(1) :=$(call CFG_LIB_NAME_$(1),core)
|
||||
CFG_STDLIB_$(1) :=$(call CFG_LIB_NAME_$(1),std)
|
||||
CFG_LIBRUSTC_$(1) :=$(call CFG_LIB_NAME_$(1),rustc)
|
||||
CFG_LIBSYNTAX_$(1) :=$(call CFG_LIB_NAME_$(1),syntax)
|
||||
CFG_LIBFUZZER_$(1) :=$(call CFG_LIB_NAME_$(1),fuzzer)
|
||||
CFG_LIBRUSTPKG_$(1) :=$(call CFG_LIB_NAME_$(1),rustpkg)
|
||||
CFG_LIBRUSTDOC_$(1) :=$(call CFG_LIB_NAME_$(1),rustdoc)
|
||||
CFG_LIBRUSTI_$(1) :=$(call CFG_LIB_NAME_$(1),rusti)
|
||||
CFG_LIBRUST_$(1) :=$(call CFG_LIB_NAME_$(1),rust)
|
||||
|
||||
STDLIB_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),std)
|
||||
CORELIB_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),core)
|
||||
LIBRUSTC_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustc)
|
||||
LIBSYNTAX_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),syntax)
|
||||
LIBFUZZER_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),fuzzer)
|
||||
LIBRUSTPKG_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustpkg)
|
||||
LIBRUSTDOC_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustdoc)
|
||||
LIBRUSTI_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rusti)
|
||||
LIBRUST_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rust)
|
||||
STDLIB_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),std)
|
||||
CORELIB_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),core)
|
||||
LIBRUSTC_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustc)
|
||||
LIBSYNTAX_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),syntax)
|
||||
LIBFUZZER_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),fuzzer)
|
||||
LIBRUSTPKG_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustpkg)
|
||||
LIBRUSTDOC_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustdoc)
|
||||
LIBRUSTI_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rusti)
|
||||
LIBRUST_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rust)
|
||||
|
||||
endef
|
||||
|
||||
$(foreach target,$(CFG_TARGET_TRIPLES), \
|
||||
$(eval $(call LIBREQ,$(target))))
|
||||
|
||||
# version-string calculation
|
||||
CFG_GIT_DIR := $(CFG_SRC_DIR).git
|
||||
|
@ -190,13 +197,13 @@ endif
|
|||
# Target-and-rule "utility variables"
|
||||
######################################################################
|
||||
|
||||
ifdef VERBOSE
|
||||
#ifdef VERBOSE
|
||||
Q :=
|
||||
E =
|
||||
else
|
||||
Q := @
|
||||
E = echo $(1)
|
||||
endif
|
||||
#else
|
||||
# Q := @
|
||||
# E = echo $(1)
|
||||
#endif
|
||||
|
||||
S := $(CFG_SRC_DIR)
|
||||
X := $(CFG_EXE_SUFFIX)
|
||||
|
@ -338,26 +345,26 @@ ifdef CFG_DISABLE_SHAREDSTD
|
|||
$$(TLIB$(1)_T_$(2)_H_$(3))/librustc.rlib
|
||||
else
|
||||
HCORELIB_DEFAULT$(1)_H_$(3) = \
|
||||
$$(HLIB$(1)_H_$(3))/$(CFG_CORELIB)
|
||||
$$(HLIB$(1)_H_$(3))/$(CFG_CORELIB_$(3))
|
||||
TCORELIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB)
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB_$(2))
|
||||
|
||||
HSTDLIB_DEFAULT$(1)_H_$(3) = \
|
||||
$$(HLIB$(1)_H_$(3))/$(CFG_STDLIB)
|
||||
$$(HLIB$(1)_H_$(3))/$(CFG_STDLIB_$(3))
|
||||
TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB)
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2))
|
||||
|
||||
HLIBRUSTC_DEFAULT$(1)_H_$(3) = \
|
||||
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTC)
|
||||
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTC_$(3))
|
||||
TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3) = \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC)
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3))
|
||||
endif
|
||||
|
||||
# Preqrequisites for using the stageN compiler
|
||||
HSREQ$(1)_H_$(3) = \
|
||||
$$(HBIN$(1)_H_$(3))/rustc$$(X) \
|
||||
$$(HLIB$(1)_H_$(3))/$$(CFG_RUNTIME) \
|
||||
$$(HLIB$(1)_H_$(3))/$$(CFG_RUSTLLVM) \
|
||||
$$(HLIB$(1)_H_$(3))/$(CFG_RUNTIME_$(3)) \
|
||||
$$(HLIB$(1)_H_$(3))/$(CFG_RUSTLLVM_$(3)) \
|
||||
$$(HCORELIB_DEFAULT$(1)_H_$(3)) \
|
||||
$$(HSTDLIB_DEFAULT$(1)_H_$(3)) \
|
||||
$$(HLIBSYNTAX_DEFAULT$(1)_H_$(3)) \
|
||||
|
@ -367,14 +374,14 @@ HSREQ$(1)_H_$(3) = \
|
|||
# Prerequisites for using the stageN compiler to build target artifacts
|
||||
TSREQ$(1)_T_$(2)_H_$(3) = \
|
||||
$$(HSREQ$(1)_H_$(3)) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUNTIME) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUNTIME_$(2)) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a
|
||||
|
||||
# Prerequisites for a working stageN compiler and libraries, for a specific target
|
||||
SREQ$(1)_T_$(2)_H_$(3) = \
|
||||
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB)
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB_$(2)) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2))
|
||||
|
||||
# Prerequisites for a working stageN compiler and libraries, for a specific target
|
||||
CSREQ$(1)_T_$(2)_H_$(3) = \
|
||||
|
@ -384,20 +391,20 @@ CSREQ$(1)_T_$(2)_H_$(3) = \
|
|||
$$(HBIN$(1)_H_$(3))/rustdoc$$(X) \
|
||||
$$(HBIN$(1)_H_$(3))/rusti$$(X) \
|
||||
$$(HBIN$(1)_H_$(3))/rust$$(X) \
|
||||
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBFUZZER) \
|
||||
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTPKG) \
|
||||
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTDOC) \
|
||||
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTI) \
|
||||
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUST) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBFUZZER) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTPKG) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTDOC) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTI) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUST)
|
||||
$$(HLIB$(1)_H_$(3))/$(CFG_LIBFUZZER_$(3)) \
|
||||
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTPKG_$(3)) \
|
||||
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTDOC_$(3)) \
|
||||
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTI_$(3)) \
|
||||
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUST_$(3)) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB_$(3)) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(3)) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(3)) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBFUZZER_$(3)) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTPKG_$(3)) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTDOC_$(3)) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTI_$(3)) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUST_$(3))
|
||||
|
||||
ifeq ($(1),0)
|
||||
# Don't run the the stage0 compiler under valgrind - that ship has sailed
|
||||
|
|
|
@ -349,6 +349,7 @@ valopt llvm-root "" "set LLVM root"
|
|||
valopt build-triple "${DEFAULT_BUILD_TRIPLE}" "LLVM build triple"
|
||||
valopt host-triples "${CFG_BUILD_TRIPLE}" "LLVM host triples"
|
||||
valopt target-triples "${CFG_HOST_TRIPLES}" "LLVM target triples"
|
||||
valopt android-ndk-path "" "Android NDK Standalone path"
|
||||
|
||||
# Validate Options
|
||||
step_msg "validating $CFG_SELF args"
|
||||
|
@ -529,6 +530,24 @@ else
|
|||
CFG_C_COMPILER="gcc"
|
||||
fi
|
||||
|
||||
if [ ! -z "$CFG_ANDROID_NDK_PATH" ]
|
||||
then
|
||||
if [ ! -f $CFG_ANDROID_NDK_PATH/bin/arm-linux-androideabi-gcc ]
|
||||
then
|
||||
err "NDK $CFG_ANDROID_NDK_PATH/bin/arm-linux-androideabi-gcc not found"
|
||||
fi
|
||||
if [ ! -f $CFG_ANDROID_NDK_PATH/bin/arm-linux-androideabi-g++ ]
|
||||
then
|
||||
err "NDK $CFG_ANDROID_NDK_PATH/bin/arm-linux-androideabi-g++ not found"
|
||||
fi
|
||||
if [ ! -f $CFG_ANDROID_NDK_PATH/bin/arm-linux-androideabi-ar ]
|
||||
then
|
||||
err "NDK $CFG_ANDROID_NDK_PATH/bin/arm-linux-androideabi-ar not found"
|
||||
fi
|
||||
|
||||
CFG_CROSS_PREFIX_arm=$CFG_ANDROID_NDK_PATH"/bin/arm-linux-androideabi-"
|
||||
fi
|
||||
|
||||
# a little post-processing of various config values
|
||||
|
||||
CFG_PREFIX=${CFG_PREFIX%/}
|
||||
|
@ -575,7 +594,7 @@ for t in $CFG_TARGET_TRIPLES
|
|||
do
|
||||
make_dir rt/$t
|
||||
for i in \
|
||||
isaac linenoise sync test arch/i386 arch/x86_64 \
|
||||
isaac linenoise sync test arch/i386 arch/x86_64 arch/arm \
|
||||
libuv
|
||||
do
|
||||
make_dir rt/$t/$i
|
||||
|
@ -822,6 +841,7 @@ putvar CFG_TARGET_TRIPLES
|
|||
putvar CFG_C_COMPILER
|
||||
putvar CFG_LIBDIR
|
||||
putvar CFG_DISABLE_MANAGE_SUBMODULES
|
||||
putvar CFG_CROSS_PREFIX_arm
|
||||
|
||||
if [ ! -z "$CFG_ENABLE_PAX_FLAGS" ]
|
||||
then
|
||||
|
|
72
mk/clean.mk
72
mk/clean.mk
|
@ -69,26 +69,26 @@ clean$(1)_H_$(2):
|
|||
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rustdoc$(X)
|
||||
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rusti$(X)
|
||||
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rust$(X)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBFUZZER)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTPKG)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTDOC)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_RUNTIME)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_CORELIB)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_STDLIB)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTC)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBSYNTAX)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTI)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUST)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CORELIB_GLOB)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(STDLIB_GLOB)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTC_GLOB)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBSYNTAX_GLOB)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBFUZZER_GLOB)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTPKG_GLOB)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTDOC_GLOB)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTI_GLOB)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUST_GLOB)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_RUSTLLVM)
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBFUZZER_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTPKG_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTDOC_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_RUNTIME_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_CORELIB_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_STDLIB_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTC_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBSYNTAX_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTI_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUST_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CORELIB_GLOB_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(STDLIB_GLOB_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTC_GLOB_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBSYNTAX_GLOB_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBFUZZER_GLOB_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTPKG_GLOB_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTDOC_GLOB_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTI_GLOB_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUST_GLOB_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_RUSTLLVM_$(2))
|
||||
$(Q)rm -f $$(HLIB$(1)_H_$(2))/libstd.rlib
|
||||
|
||||
endef
|
||||
|
@ -105,22 +105,22 @@ clean$(1)_T_$(2)_H_$(3):
|
|||
$(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/rustpkg$(X)
|
||||
$(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/serializer$(X)
|
||||
$(Q)rm -f $$(TBIN$(1)_T_$(2)_H_$(3))/rustdoc$(X)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBFUZZER)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTPKG)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTDOC)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUNTIME)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CORELIB_GLOB)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(STDLIB_GLOB)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTC_GLOB)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBSYNTAX_GLOB)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBFUZZER_GLOB)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTPKG_GLOB)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTDOC_GLOB)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUSTLLVM)
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBFUZZER_$(2))
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTPKG_$(2))
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTDOC_$(2))
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUNTIME_$(2))
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB_$(2))
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2))
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(2))
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(2))
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CORELIB_GLOB_$(2))
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(STDLIB_GLOB_$(2))
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTC_GLOB_$(2))
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBSYNTAX_GLOB_$(2))
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBFUZZER_GLOB_$(2))
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTPKG_GLOB_$(2))
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(LIBRUSTDOC_GLOB_$(2))
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUSTLLVM_$(2))
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libstd.rlib
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a
|
||||
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/librun_pass_stage* # For unix
|
||||
|
|
62
mk/host.mk
62
mk/host.mk
|
@ -23,47 +23,47 @@ define CP_HOST_STAGE_N
|
|||
|
||||
$$(HBIN$(2)_H_$(4))/rustc$$(X): \
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/rustc$$(X) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_RUSTLLVM) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(3)) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_RUSTLLVM_$(3)) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTC_$(3)) \
|
||||
$$(HCORELIB_DEFAULT$(2)_H_$(4)) \
|
||||
$$(HSTDLIB_DEFAULT$(2)_H_$(4))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTC) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBSYNTAX) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_RUSTLLVM) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTC_$(3)): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(3)) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_LIBSYNTAX_$(3)) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(3)) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_RUSTLLVM_$(3)) \
|
||||
$$(HCORELIB_DEFAULT$(2)_H_$(3)) \
|
||||
$$(HSTDLIB_DEFAULT$(2)_H_$(3))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTC_GLOB) \
|
||||
$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTC_DSYM_GLOB)) \
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTC_GLOB_$(3)) \
|
||||
$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTC_DSYM_GLOB_$(3))) \
|
||||
$$(HLIB$(2)_H_$(4))
|
||||
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBSYNTAX): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBSYNTAX) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_RUSTLLVM) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_LIBSYNTAX_$(3)): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBSYNTAX_$(3)) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(3)) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_RUSTLLVM_$(3)) \
|
||||
$$(HCORELIB_DEFAULT$(2)_H_$(3)) \
|
||||
$$(HSTDLIB_DEFAULT$(2)_H_$(3))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBSYNTAX_GLOB) \
|
||||
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBSYNTAX_DSYM_GLOB)) \
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBSYNTAX_GLOB_$(3)) \
|
||||
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBSYNTAX_DSYM_GLOB_$(3))) \
|
||||
$$(HLIB$(2)_H_$(4))
|
||||
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_RUNTIME)
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(3)): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_RUNTIME_$(3))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_CORELIB): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME)
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_CORELIB_$(3)): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_CORELIB_$(3)) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(3))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
# Subtle: We do not let the shell expand $(CORELIB_DSYM_GLOB) directly rather
|
||||
|
@ -73,18 +73,18 @@ $$(HLIB$(2)_H_$(4))/$$(CFG_CORELIB): \
|
|||
# glob, and cp reports an error because libcore-*.dylib.dsym does not exist.
|
||||
# Make instead expands the glob to nothing, which gives us the correct behavior.
|
||||
# (Copy .dsym file if it exists, but do nothing otherwise)
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(CORELIB_GLOB) \
|
||||
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(CORELIB_DSYM_GLOB)) \
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(CORELIB_GLOB_$(3)) \
|
||||
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(CORELIB_DSYM_GLOB_$(3))) \
|
||||
$$(HLIB$(2)_H_$(4))
|
||||
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_STDLIB): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_CORELIB) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME)
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_STDLIB_$(3)): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(3)) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_CORELIB_$(3)) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(3))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(STDLIB_GLOB) \
|
||||
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(STDLIB_DSYM_GLOB)) \
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(STDLIB_GLOB_$(3)) \
|
||||
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(STDLIB_DSYM_GLOB_$(3))) \
|
||||
$$(HLIB$(2)_H_$(4))
|
||||
|
||||
$$(HLIB$(2)_H_$(4))/libcore.rlib: \
|
||||
|
@ -108,8 +108,8 @@ $$(HLIB$(2)_H_$(4))/librustc.rlib: \
|
|||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_RUSTLLVM): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_RUSTLLVM)
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_RUSTLLVM_$(3)): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_RUSTLLVM_$(3))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
|
||||
|
|
202
mk/platform.mk
202
mk/platform.mk
|
@ -36,10 +36,6 @@ CFG_GCCISH_CFLAGS += -fno-omit-frame-pointer
|
|||
# embedded into the executable, so use a no-op command.
|
||||
CFG_DSYMUTIL := true
|
||||
|
||||
# Add a dSYM glob for all platforms, even though it will do nothing on
|
||||
# non-Darwin platforms; omitting it causes a full -R copy of lib/
|
||||
CFG_LIB_DSYM_GLOB=lib$(1)-*.dylib.dSYM
|
||||
|
||||
# Hack: not sure how to test if a file exists in make other than this
|
||||
OS_SUPP = $(patsubst %,--suppressions=%,\
|
||||
$(wildcard $(CFG_SRC_DIR)src/etc/$(CFG_OSTYPE).supp*))
|
||||
|
@ -55,43 +51,50 @@ else
|
|||
CFG_GCCISH_CFLAGS += -O2
|
||||
endif
|
||||
|
||||
ifneq ($(findstring freebsd,$(CFG_OSTYPE)),)
|
||||
CFG_LIB_NAME=lib$(1).so
|
||||
CFG_LIB_GLOB=lib$(1)-*.so
|
||||
CFG_GCCISH_CFLAGS += -fPIC -I/usr/local/include
|
||||
CFG_GCCISH_LINK_FLAGS += -shared -fPIC -lpthread -lrt
|
||||
CFG_GCCISH_DEF_FLAG := -Wl,--export-dynamic,--dynamic-list=
|
||||
CFG_GCCISH_PRE_LIB_FLAGS := -Wl,-whole-archive
|
||||
CFG_GCCISH_POST_LIB_FLAGS := -Wl,-no-whole-archive
|
||||
CFG_GCCISH_CFLAGS_i386 += -m32
|
||||
CFG_GCCISH_LINK_FLAGS_i386 += -m32
|
||||
CFG_GCCISH_CFLAGS_x86_64 += -m64
|
||||
CFG_GCCISH_LINK_FLAGS_x86_64 += -m64
|
||||
CFG_UNIXY := 1
|
||||
CFG_FBSD := 1
|
||||
CFG_LDENV := LD_LIBRARY_PATH
|
||||
CFG_DEF_SUFFIX := .bsd.def
|
||||
CFG_INSTALL_NAME =
|
||||
CFG_PERF_TOOL := /usr/bin/time
|
||||
endif
|
||||
CFG_LIB_NAME_x86_64-unknown-linux-gnu=lib$(1).so
|
||||
CFG_LIB_GLOB_x86_64-unknown-linux-gnu=lib$(1)-*.so
|
||||
CFG_LIB_DSYM_GLOB_x86_64-unknown-linux-gnu=lib$(1)-*.dylib.dSYM
|
||||
CFG_GCCISH_CFLAGS_x86_64-unknown-linux-gnu := -Wall -Werror -g -fPIC -m64
|
||||
CFG_GCCISH_CXXFLAGS_x86_64-unknown-linux-gnu := -fno-rtti
|
||||
CFG_GCCISH_LINK_FLAGS_x86_64-unknown-linux-gnu := -shared -fPIC -ldl -lpthread -lrt -g -m64
|
||||
CFG_GCCISH_DEF_FLAG_x86_64-unknown-linux-gnu := -Wl,--export-dynamic,--dynamic-list=
|
||||
CFG_GCCISH_PRE_LIB_FLAGS_x86_64-unknown-linux-gnu := -Wl,-whole-archive
|
||||
CFG_GCCISH_POST_LIB_FLAGS_x86_64-unknown-linux-gnu := -Wl,-no-whole-archive -Wl,-znoexecstack
|
||||
CFG_DEF_SUFFIX_x86_64-unknown-linux-gnu := .linux.def
|
||||
CFG_INSTALL_NAME_x86_64-unknown-linux-gnu =
|
||||
CFG_UNIXY := 1
|
||||
CFG_LDENV := LD_LIBRARY_PATH
|
||||
CFG_GCCISH_CROSS_x86_64-unknown-linux-gnu =
|
||||
|
||||
CFG_LIB_NAME_x86_64-apple-darwin=lib$(1).dylib
|
||||
CFG_LIB_GLOB_x86_64-apple-darwin=lib$(1)-*.dylib
|
||||
CFG_LIB_DSYM_GLOB_x86_64-apple-darwin=lib$(1)-*.dylib.dSYM
|
||||
CFG_GCCISH_CFLAGS_x86_64-apple-darwin := -Wall -Werror -g -fPIC -m64 -arch x86_64
|
||||
CFG_GCCISH_CXXFLAGS_x86_64-apple-darwin := -fno-rtti
|
||||
CFG_GCCISH_LINK_FLAGS_x86_64-apple-darwin := -dynamiclib -lpthread -framework CoreServices -Wl,-no_compact_unwind -m64
|
||||
CFG_GCCISH_DEF_FLAG_x86_64-apple-darwin := -Wl,-exported_symbols_list,
|
||||
CFG_GCCISH_PRE_LIB_FLAGS_x86_64-apple-darwin :=
|
||||
CFG_GCCISH_POST_LIB_FLAGS_x86_64-apple-darwin :=
|
||||
CFG_DEF_SUFFIX_x86_64-apple-darwin := .darwin.def
|
||||
CFG_INSTALL_NAME_x86_64-apple-darwin = -Wl,-install_name,@rpath/$(1)
|
||||
|
||||
CFG_LIB_NAME_arm-unknown-android=lib$(1).so
|
||||
CFG_LIB_GLOB_arm-unknown-android=lib$(1)-*.so
|
||||
CFG_LIB_DSYM_GLOB_arm-unknown-android=lib$(1)-*.dylib.dSYM
|
||||
CFG_GCCISH_CFLAGS_arm-unknown-android := -fPIC -Wall -g -D__arm__ -DANDROID -D__ANDROID__
|
||||
CFG_GCCISH_CXXFLAGS_arm-unknown-android := -fno-rtti
|
||||
CFG_GCCISH_LINK_FLAGS_arm-unknown-android := -shared -fPIC -ldl -g -lm -lsupc++ -lgnustl_shared
|
||||
CFG_GCCISH_DEF_FLAG_arm-unknown-android := -Wl,--export-dynamic,--dynamic-list=
|
||||
CFG_GCCISH_PRE_LIB_FLAGS_arm-unknown-android := -Wl,-whole-archive
|
||||
CFG_GCCISH_POST_LIB_FLAGS_arm-unknown-android := -Wl,-no-whole-archive -Wl,-znoexecstack
|
||||
CFG_DEF_SUFFIX_arm-unknown-android := .android.def
|
||||
CFG_INSTALL_NAME_arm-unknown-android =
|
||||
CFG_GCCISH_CROSS_arm-unknown-android = $(CFG_CROSS_PREFIX_arm)
|
||||
|
||||
|
||||
ifneq ($(findstring linux,$(CFG_OSTYPE)),)
|
||||
CFG_LIB_NAME=lib$(1).so
|
||||
CFG_LIB_GLOB=lib$(1)-*.so
|
||||
CFG_GCCISH_CFLAGS += -fPIC
|
||||
CFG_GCCISH_LINK_FLAGS += -shared -fPIC -ldl -lpthread -lrt
|
||||
CFG_GCCISH_DEF_FLAG := -Wl,--export-dynamic,--dynamic-list=
|
||||
CFG_GCCISH_PRE_LIB_FLAGS := -Wl,-whole-archive
|
||||
# -znoexecstack is here because librt is for some reason being created
|
||||
# with executable stack and Fedora (or SELinux) doesn't like that (#798)
|
||||
CFG_GCCISH_POST_LIB_FLAGS := -Wl,-no-whole-archive -Wl,-znoexecstack
|
||||
CFG_GCCISH_CFLAGS_i386 = -m32
|
||||
CFG_GCCISH_LINK_FLAGS_i386 = -m32
|
||||
CFG_GCCISH_CFLAGS_x86_64 = -m64
|
||||
CFG_GCCISH_LINK_FLAGS_x86_64 = -m64
|
||||
CFG_UNIXY := 1
|
||||
CFG_LDENV := LD_LIBRARY_PATH
|
||||
CFG_DEF_SUFFIX := .linux.def
|
||||
ifdef CFG_PERF
|
||||
ifneq ($(CFG_PERF_WITH_LOGFD),)
|
||||
CFG_PERF_TOOL := $(CFG_PERF) stat -r 3 --log-fd 2
|
||||
|
@ -106,34 +109,10 @@ ifneq ($(findstring linux,$(CFG_OSTYPE)),)
|
|||
CFG_PERF_TOOL := /usr/bin/time --verbose
|
||||
endif
|
||||
endif
|
||||
CFG_INSTALL_NAME =
|
||||
# Linux requires LLVM to be built like this to get backtraces into Rust code
|
||||
CFG_LLVM_BUILD_ENV="CXXFLAGS=-fno-omit-frame-pointer"
|
||||
endif
|
||||
|
||||
ifneq ($(findstring darwin,$(CFG_OSTYPE)),)
|
||||
CFG_LIB_NAME=lib$(1).dylib
|
||||
CFG_LIB_GLOB=lib$(1)-*.dylib
|
||||
CFG_UNIXY := 1
|
||||
CFG_LDENV := DYLD_LIBRARY_PATH
|
||||
CFG_GCCISH_LINK_FLAGS += -dynamiclib -lpthread -framework CoreServices -Wl,-no_compact_unwind
|
||||
CFG_GCCISH_DEF_FLAG := -Wl,-exported_symbols_list,
|
||||
# Darwin has a very blurry notion of "64 bit", and claims it's running
|
||||
# "on an i386" when the whole userspace is 64-bit and the compiler
|
||||
# emits 64-bit binaries by default. So we just force -m32 here. Smarter
|
||||
# approaches welcome!
|
||||
#
|
||||
# NB: Currently GCC's optimizer breaks rustrt (task-comm-1 hangs) on Darwin.
|
||||
CFG_GCCISH_CFLAGS_i386 := -m32 -arch i386
|
||||
CFG_GCCISH_CFLAGS_x86_64 := -m64 -arch x86_64
|
||||
CFG_GCCISH_LINK_FLAGS_i386 := -m32
|
||||
CFG_GCCISH_LINK_FLAGS_x86_64 := -m64
|
||||
CFG_DSYMUTIL := dsymutil
|
||||
CFG_DEF_SUFFIX := .darwin.def
|
||||
# Mac requires this flag to make rpath work
|
||||
CFG_INSTALL_NAME = -Wl,-install_name,@rpath/$(1)
|
||||
endif
|
||||
|
||||
ifdef CFG_UNIXY
|
||||
CFG_INFO := $(info cfg: unix-y environment)
|
||||
|
||||
|
@ -143,7 +122,7 @@ ifdef CFG_UNIXY
|
|||
CFG_RUN=$(2)
|
||||
CFG_RUN_TARG=$(call CFG_RUN,,$(2))
|
||||
CFG_RUN_TEST=$(call CFG_RUN,,$(CFG_VALGRIND) $(1))
|
||||
CFG_LIBUV_LINK_FLAGS=-lpthread
|
||||
CFG_LIBUV_LINK_FLAGS=
|
||||
ifdef CFG_FBSD
|
||||
CFG_LIBUV_LINK_FLAGS=-lpthread -lkvm
|
||||
endif
|
||||
|
@ -233,22 +212,15 @@ ifeq ($(CFG_C_COMPILER),clang)
|
|||
CXX=clang++
|
||||
endif
|
||||
ifeq ($(origin CPP),default)
|
||||
CPP=clang -E
|
||||
CPP=clang
|
||||
endif
|
||||
CFG_GCCISH_CFLAGS += -Wall -Werror -g
|
||||
CFG_GCCISH_CXXFLAGS += -fno-rtti
|
||||
CFG_GCCISH_LINK_FLAGS += -g
|
||||
CFG_GCCISH_CFLAGS +=
|
||||
CFG_GCCISH_CXXFLAGS +=
|
||||
CFG_GCCISH_LINK_FLAGS +=
|
||||
# These flags will cause the compiler to produce a .d file
|
||||
# next to the .o file that lists header deps.
|
||||
CFG_DEPEND_FLAGS = -MMD -MP -MT $(1) -MF $(1:%.o=%.d)
|
||||
|
||||
CFG_SPECIFIC_CC_CFLAGS = $(CFG_CLANG_CFLAGS)
|
||||
define MAKE_CLANG_SPECIFIC_CFLAGS
|
||||
CFG_SPECIFIC_CC_CFLAGS_$$(HOST_$(target)) = $(CFG_CLANG_CFLAGS_$$(HOST_$(target)))
|
||||
endef
|
||||
$(foreach target,$(CFG_TARGET_TRIPLES), \
|
||||
$(eval $(call MAKE_CLANG_SPECIFIC_CFLAGS,$(target))))
|
||||
|
||||
else
|
||||
ifeq ($(CFG_C_COMPILER),gcc)
|
||||
ifeq ($(origin CC),default)
|
||||
|
@ -258,53 +230,73 @@ ifeq ($(CFG_C_COMPILER),gcc)
|
|||
CXX=g++
|
||||
endif
|
||||
ifeq ($(origin CPP),default)
|
||||
CPP=gcc -E
|
||||
CPP=gcc
|
||||
endif
|
||||
CFG_GCCISH_CFLAGS += -Wall -Werror -g
|
||||
CFG_GCCISH_CXXFLAGS += -fno-rtti
|
||||
CFG_GCCISH_LINK_FLAGS += -g
|
||||
CFG_GCCISH_CFLAGS +=
|
||||
CFG_GCCISH_CXXFLAGS +=
|
||||
CFG_GCCISH_LINK_FLAGS +=
|
||||
# These flags will cause the compiler to produce a .d file
|
||||
# next to the .o file that lists header deps.
|
||||
CFG_DEPEND_FLAGS = -MMD -MP -MT $(1) -MF $(1:%.o=%.d)
|
||||
|
||||
CFG_SPECIFIC_CC_CFLAGS = $(CFG_GCC_CFLAGS)
|
||||
define MAKE_GCC_SPECIFIC_CFLAGS
|
||||
CFG_SPECIFIC_CC_CFLAGS_$$(HOST_$(target)) = $(CFG_GCC_CFLAGS_$$(HOST_$(target)))
|
||||
endef
|
||||
$(foreach target,$(CFG_TARGET_TRIPLES), \
|
||||
$(eval $(call MAKE_GCC_SPECIFIC_CFLAGS,$(target))))
|
||||
|
||||
else
|
||||
CFG_ERR := $(error please try on a system with gcc or clang)
|
||||
endif
|
||||
endif
|
||||
|
||||
define CFG_MAKE_CC
|
||||
CFG_COMPILE_C_$(1) = $$(CFG_GCCISH_CROSS)$$(CC) \
|
||||
ifeq ($$(CFG_BUILD_TRIPLE),$(1))
|
||||
|
||||
CFG_COMPILE_C_$(1) = $$(CC) \
|
||||
$$(CFG_GCCISH_CFLAGS) \
|
||||
$$(CFG_GCCISH_CFLAGS_$$(HOST_$(1))) \
|
||||
$$(CFG_SPECIFIC_CC_CFLAGS) \
|
||||
$$(CFG_SPECIFIC_CC_CFLAGS_$$(HOST_$(1))) \
|
||||
$$(CFG_GCCISH_CFLAGS_$(1)) \
|
||||
$$(CFG_DEPEND_FLAGS) \
|
||||
-c -o $$(1) $$(2)
|
||||
CFG_LINK_C_$(1) = $$(CFG_GCCISH_CROSS)$$(CC) \
|
||||
CFG_LINK_C_$(1) = $$(CC) \
|
||||
$$(CFG_GCCISH_LINK_FLAGS) -o $$(1) \
|
||||
$$(CFG_GCCISH_LINK_FLAGS_$$(HOST_$(1))) \
|
||||
$$(CFG_GCCISH_DEF_FLAG)$$(3) $$(2) \
|
||||
$$(call CFG_INSTALL_NAME,$$(4))
|
||||
CFG_COMPILE_CXX_$(1) = $$(CFG_GCCISH_CROSS)$$(CXX) \
|
||||
$$(CFG_GCCISH_LINK_FLAGS_$(1))) \
|
||||
$$(CFG_GCCISH_DEF_FLAG_$(1))$$(3) $$(2) \
|
||||
$$(call CFG_INSTALL_NAME_$(1),$$(4))
|
||||
CFG_COMPILE_CXX_$(1) = $$(CXX) \
|
||||
$$(CFG_GCCISH_CFLAGS) \
|
||||
$$(CFG_GCCISH_CXXFLAGS) \
|
||||
$$(CFG_GCCISH_CFLAGS_$$(HOST_$(1))) \
|
||||
$$(CFG_SPECIFIC_CC_CFLAGS) \
|
||||
$$(CFG_SPECIFIC_CC_CFLAGS_$$(HOST_$(1))) \
|
||||
$$(CFG_GCCISH_CFLAGS_$(1)) \
|
||||
$$(CFG_GCCISH_CXXFLAGS_$(1)) \
|
||||
$$(CFG_DEPEND_FLAGS) \
|
||||
-c -o $$(1) $$(2)
|
||||
CFG_LINK_CXX_$(1) = $$(CFG_GCCISH_CROSS)$$(CXX) \
|
||||
CFG_LINK_CXX_$(1) = $$(CXX) \
|
||||
$$(CFG_GCCISH_LINK_FLAGS) -o $$(1) \
|
||||
$$(CFG_GCCISH_LINK_FLAGS_$$(HOST_$(1))) \
|
||||
$$(CFG_GCCISH_DEF_FLAG)$$(3) $$(2) \
|
||||
$$(call CFG_INSTALL_NAME,$$(4))
|
||||
$$(CFG_GCCISH_LINK_FLAGS_$(1)) \
|
||||
$$(CFG_GCCISH_DEF_FLAG_$(1))$$(3) $$(2) \
|
||||
$$(call CFG_INSTALL_NAME_$(1),$$(4))
|
||||
|
||||
else
|
||||
|
||||
CFG_COMPILE_C_$(1) = $(CFG_GCCISH_CROSS_$(1))$$(CC) \
|
||||
$$(CFG_GCCISH_CFLAGS) \
|
||||
$$(CFG_GCCISH_CFLAGS_$(1)) \
|
||||
$$(CFG_DEPEND_FLAGS) \
|
||||
-c -o $$(1) $$(2)
|
||||
CFG_LINK_C_$(1) = $(CFG_GCCISH_CROSS_$(1))$$(CC) \
|
||||
$$(CFG_GCCISH_LINK_FLAGS) -o $$(1) \
|
||||
$$(CFG_GCCISH_LINK_FLAGS_$(1))) \
|
||||
$$(CFG_GCCISH_DEF_FLAG_$(1))$$(3) $$(2) \
|
||||
$$(call CFG_INSTALL_NAME_$(1),$$(4))
|
||||
CFG_COMPILE_CXX_$(1) = $(CFG_GCCISH_CROSS_$(1))$$(CXX) \
|
||||
$$(CFG_GCCISH_CFLAGS) \
|
||||
$$(CFG_GCCISH_CXXFLAGS) \
|
||||
$$(CFG_GCCISH_CFLAGS_$(1)) \
|
||||
$$(CFG_GCCISH_CXXFLAGS_$(1)) \
|
||||
$$(CFG_DEPEND_FLAGS) \
|
||||
-c -o $$(1) $$(2)
|
||||
CFG_LINK_CXX_$(1) = $(CFG_GCCISH_CROSS_$(1))$$(CXX) \
|
||||
$$(CFG_GCCISH_LINK_FLAGS) -o $$(1) \
|
||||
$$(CFG_GCCISH_LINK_FLAGS_$(1)) \
|
||||
$$(CFG_GCCISH_DEF_FLAG_$(1))$$(3) $$(2) \
|
||||
$$(call CFG_INSTALL_NAME_$(1),$$(4))
|
||||
|
||||
endif
|
||||
|
||||
endef
|
||||
|
||||
$(foreach target,$(CFG_TARGET_TRIPLES), \
|
||||
|
@ -313,12 +305,20 @@ $(foreach target,$(CFG_TARGET_TRIPLES), \
|
|||
# We're using llvm-mc as our assembler because it supports
|
||||
# .cfi pseudo-ops on mac
|
||||
define CFG_MAKE_ASSEMBLER
|
||||
CFG_ASSEMBLE_$(1)=$$(CPP) $$(CFG_DEPEND_FLAGS) $$(2) | \
|
||||
ifeq ($$(CFG_BUILD_TRIPLE),$(1))
|
||||
|
||||
CFG_ASSEMBLE_$(1)=$$(CPP) -E $$(CFG_DEPEND_FLAGS) $$(2) | \
|
||||
$$(LLVM_MC_$$(CFG_BUILD_TRIPLE)) \
|
||||
-assemble \
|
||||
-filetype=obj \
|
||||
-triple=$(1) \
|
||||
-o=$$(1)
|
||||
else
|
||||
|
||||
CFG_ASSEMBLE_$(1)=$(CFG_GCCISH_CROSS_$(1))$$(CPP) $$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)
|
||||
|
||||
endif
|
||||
|
||||
endef
|
||||
|
||||
$(foreach target,$(CFG_TARGET_TRIPLES),\
|
||||
|
|
45
mk/rt.mk
45
mk/rt.mk
|
@ -26,6 +26,7 @@
|
|||
# Hack for passing flags into LIBUV, see below.
|
||||
LIBUV_FLAGS_i386 = -m32 -fPIC
|
||||
LIBUV_FLAGS_x86_64 = -m64 -fPIC
|
||||
LIBUV_FLAGS_arm = -fPIC -DANDROID -std=gnu99
|
||||
|
||||
# when we're doing a snapshot build, we intentionally degrade as many
|
||||
# features in libuv and the runtime as possible, to ease portability.
|
||||
|
@ -73,7 +74,8 @@ RUNTIME_CXXS_$(1) := \
|
|||
rt/memory_region.cpp \
|
||||
rt/boxed_region.cpp \
|
||||
rt/arch/$$(HOST_$(1))/context.cpp \
|
||||
rt/arch/$$(HOST_$(1))/gpr.cpp
|
||||
rt/arch/$$(HOST_$(1))/gpr.cpp \
|
||||
rt/rust_android_dummy.cpp
|
||||
|
||||
RUNTIME_CS_$(1) := rt/linenoise/linenoise.c rt/linenoise/utf8.c
|
||||
|
||||
|
@ -81,27 +83,20 @@ RUNTIME_S_$(1) := rt/arch/$$(HOST_$(1))/_context.S \
|
|||
rt/arch/$$(HOST_$(1))/ccall.S \
|
||||
rt/arch/$$(HOST_$(1))/record_sp.S
|
||||
|
||||
ifeq ($$(HOST_$(1)), i386)
|
||||
LIBUV_ARCH_$(1) := ia32
|
||||
else
|
||||
LIBUV_ARCH_$(1) := x86_64
|
||||
endif
|
||||
|
||||
ifeq ($$(CFG_WINDOWSY), 1)
|
||||
LIBUV_OSTYPE_$(1) := win
|
||||
ifeq ($$(HOST_$(1)), arm)
|
||||
LIBUV_LIB_$(1) := rt/$(1)/libuv/libuv.a
|
||||
else ifeq ($$(CFG_WINDOWSY), 1)
|
||||
LIBUV_LIB_$(1) := rt/$(1)/libuv/libuv.a
|
||||
else ifeq ($(CFG_OSTYPE), apple-darwin)
|
||||
LIBUV_OSTYPE_$(1) := mac
|
||||
LIBUV_LIB_$(1) := rt/$(1)/libuv/libuv.a
|
||||
else ifeq ($(CFG_OSTYPE), unknown-freebsd)
|
||||
LIBUV_OSTYPE_$(1) := unix/freebsd
|
||||
LIBUV_LIB_$(1) := rt/$(1)/libuv/libuv.a
|
||||
else
|
||||
LIBUV_OSTYPE_$(1) := unix/linux
|
||||
LIBUV_LIB_$(1) := rt/$(1)/libuv/libuv.a
|
||||
endif
|
||||
|
||||
RUNTIME_DEF_$(1) := rt/rustrt$$(CFG_DEF_SUFFIX)
|
||||
RUNTIME_DEF_$(1) := rt/rustrt$(CFG_DEF_SUFFIX_$(1))
|
||||
RUNTIME_INCS_$(1) := -I $$(S)src/rt -I $$(S)src/rt/isaac -I $$(S)src/rt/uthash \
|
||||
-I $$(S)src/rt/arch/$$(HOST_$(1)) \
|
||||
-I $$(S)src/rt/linenoise \
|
||||
|
@ -135,13 +130,13 @@ rt/$(1)/arch/$$(HOST_$(1))/libmorestack.a: $$(MORESTACK_OBJ_$(1))
|
|||
@$$(call E, link: $$@)
|
||||
$$(Q)ar rcs $$@ $$<
|
||||
|
||||
rt/$(1)/$(CFG_RUNTIME): $$(RUNTIME_OBJS_$(1)) $$(MKFILE_DEPS) \
|
||||
rt/$(1)/$(CFG_RUNTIME_$(1)): $$(RUNTIME_OBJS_$(1)) $$(MKFILE_DEPS) \
|
||||
$$(RUNTIME_DEF_$(1)) \
|
||||
$$(RUNTIME_LIBS_$(1))
|
||||
@$$(call E, link: $$@)
|
||||
$$(Q)$$(call CFG_LINK_CXX_$(1),$$@, $$(RUNTIME_OBJS_$(1)) \
|
||||
$$(CFG_GCCISH_POST_LIB_FLAGS) $$(RUNTIME_LIBS_$(1)) \
|
||||
$$(CFG_LIBUV_LINK_FLAGS),$$(RUNTIME_DEF_$(1)),$$(CFG_RUNTIME))
|
||||
$$(CFG_GCCISH_POST_LIB_FLAGS_$(1)) $$(RUNTIME_LIBS_$(1)) \
|
||||
$$(CFG_LIBUV_LINK_FLAGS),$$(RUNTIME_DEF_$(1)),$$(CFG_RUNTIME_$(1)))
|
||||
|
||||
# FIXME: For some reason libuv's makefiles can't figure out the
|
||||
# correct definition of CC on the mingw I'm using, so we are
|
||||
|
@ -165,12 +160,26 @@ $$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
|
|||
OS=mingw \
|
||||
V=$$(VERBOSE)
|
||||
else
|
||||
ifeq ($$(HOST_$(1)), arm)
|
||||
$$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
|
||||
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
|
||||
CFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
|
||||
LDFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1)))" \
|
||||
CC="$$(CFG_GCCISH_CROSS_$(1))$$(CC)" \
|
||||
CXX="$$(CFG_GCCISH_CROSS_$(1))$$(CXX)" \
|
||||
AR="$$(CFG_CROSS_PREFIX_arm)$$(AR)" \
|
||||
BUILDTYPE=Release \
|
||||
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/libuv" \
|
||||
host=android OS=linux \
|
||||
V=$$(VERBOSE)
|
||||
else
|
||||
$$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
|
||||
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
|
||||
CFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
|
||||
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/libuv" \
|
||||
V=$$(VERBOSE)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
# These could go in rt.mk or rustllvm.mk, they're needed for both.
|
||||
|
@ -188,6 +197,12 @@ endif
|
|||
$$(Q)sed 's/.$$$$/&;/' $$< >> $$@
|
||||
$$(Q)echo "};" >> $$@
|
||||
|
||||
%.android.def: %.def.in $$(MKFILE_DEPS)
|
||||
@$$(call E, def: $$@)
|
||||
$$(Q)echo "{" > $$@
|
||||
$$(Q)sed 's/.$$$$/&;/' $$< >> $$@
|
||||
$$(Q)echo "};" >> $$@
|
||||
|
||||
%.darwin.def: %.def.in $$(MKFILE_DEPS)
|
||||
@$$(call E, def: $$@)
|
||||
$$(Q)sed 's/^./_&/' $$< > $$@
|
||||
|
|
|
@ -24,7 +24,7 @@ endif
|
|||
|
||||
RUSTLLVM_OBJS_CS_$(1) := $$(addprefix rustllvm/, RustWrapper.cpp)
|
||||
|
||||
RUSTLLVM_DEF_$(1) := rustllvm/rustllvm$$(CFG_DEF_SUFFIX)
|
||||
RUSTLLVM_DEF_$(1) := rustllvm/rustllvm$(CFG_DEF_SUFFIX_$(1))
|
||||
|
||||
RUSTLLVM_INCS_$(1) = $$(LLVM_EXTRA_INCDIRS_$(1)) \
|
||||
-iquote $$(LLVM_INCDIR_$(1)) \
|
||||
|
@ -32,13 +32,13 @@ RUSTLLVM_INCS_$(1) = $$(LLVM_EXTRA_INCDIRS_$(1)) \
|
|||
RUSTLLVM_OBJS_OBJS_$(1) := $$(RUSTLLVM_OBJS_CS_$(1):rustllvm/%.cpp=rustllvm/$(1)/%.o)
|
||||
ALL_OBJ_FILES += $$(RUSTLLVM_OBJS_OBJS_$(1))
|
||||
|
||||
rustllvm/$(1)/$(CFG_RUSTLLVM): $$(RUSTLLVM_OBJS_OBJS_$(1)) \
|
||||
rustllvm/$(1)/$(CFG_RUSTLLVM_$(1)): $$(RUSTLLVM_OBJS_OBJS_$(1)) \
|
||||
$$(MKFILE_DEPS) $$(RUSTLLVM_DEF_$(1))
|
||||
@$$(call E, link: $$@)
|
||||
$$(Q)$$(call CFG_LINK_CXX_$(1),$$@,$$(RUSTLLVM_OBJS_OBJS_$(1)) \
|
||||
$$(CFG_GCCISH_PRE_LIB_FLAGS) $$(LLVM_LIBS_$(1)) \
|
||||
$$(CFG_GCCISH_POST_LIB_FLAGS) \
|
||||
$$(LLVM_LDFLAGS_$(1)),$$(RUSTLLVM_DEF_$(1)),$$(CFG_RUSTLLVM))
|
||||
$$(CFG_GCCISH_PRE_LIB_FLAGS_$(1)) $$(LLVM_LIBS_$(1)) \
|
||||
$$(CFG_GCCISH_POST_LIB_FLAGS_$(1)) \
|
||||
$$(LLVM_LDFLAGS_$(1)),$$(RUSTLLVM_DEF_$(1)),$$(CFG_RUSTLLVM_$(1)))
|
||||
|
||||
rustllvm/$(1)/%.o: rustllvm/%.cpp $$(MKFILE_DEPS) $$(LLVM_CONFIG_$(1))
|
||||
@$$(call E, compile: $$@)
|
||||
|
|
36
mk/stage0.mk
36
mk/stage0.mk
|
@ -21,23 +21,23 @@ endif
|
|||
|
||||
# Host libs will be extracted by the above rule
|
||||
|
||||
$(HLIB0_H_$(CFG_BUILD_TRIPLE))/$(CFG_RUNTIME): \
|
||||
$(HLIB0_H_$(CFG_BUILD_TRIPLE))/$(CFG_RUNTIME_$(CFG_BUILD_TRIPLE)): \
|
||||
$(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X)
|
||||
$(Q)touch $@
|
||||
|
||||
$(HLIB0_H_$(CFG_BUILD_TRIPLE))/$(CFG_CORELIB): \
|
||||
$(HLIB0_H_$(CFG_BUILD_TRIPLE))/$(CFG_CORELIB_$(CFG_BUILD_TRIPLE)): \
|
||||
$(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X)
|
||||
$(Q)touch $@
|
||||
|
||||
$(HLIB0_H_$(CFG_BUILD_TRIPLE))/$(CFG_STDLIB): \
|
||||
$(HLIB0_H_$(CFG_BUILD_TRIPLE))/$(CFG_STDLIB_$(CFG_BUILD_TRIPLE)): \
|
||||
$(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X)
|
||||
$(Q)touch $@
|
||||
|
||||
$(HLIB0_H_$(CFG_BUILD_TRIPLE))/$(CFG_LIBRUSTC): \
|
||||
$(HLIB0_H_$(CFG_BUILD_TRIPLE))/$(CFG_LIBRUSTC_$(CFG_BUILD_TRIPLE)): \
|
||||
$(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X)
|
||||
$(Q)touch $@
|
||||
|
||||
$(HLIB0_H_$(CFG_BUILD_TRIPLE))/$(CFG_RUSTLLVM): \
|
||||
$(HLIB0_H_$(CFG_BUILD_TRIPLE))/$(CFG_RUSTLLVM_$(CFG_BUILD_TRIPLE)): \
|
||||
$(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X)
|
||||
$(Q)touch $@
|
||||
|
||||
|
@ -53,28 +53,28 @@ $$(HBIN0_H_$(1))/rustc$$(X): \
|
|||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
|
||||
$$(HLIB0_H_$(1))/$$(CFG_RUNTIME): \
|
||||
$$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_RUNTIME)
|
||||
$$(HLIB0_H_$(1))/$(CFG_RUNTIME_$(4)): \
|
||||
$$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_RUNTIME_$(4))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
|
||||
$$(HLIB0_H_$(1))/$(CFG_CORELIB): \
|
||||
$$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_CORELIB)
|
||||
$$(HLIB0_H_$(1))/$(CFG_CORELIB_$(4)): \
|
||||
$$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_CORELIB_$(4))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$$(CORELIB_GLOB) $$@
|
||||
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(CORELIB_GLOB_$(4)) $$@
|
||||
|
||||
$$(HLIB0_H_$(1))/$(CFG_STDLIB): \
|
||||
$$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_STDLIB)
|
||||
$$(HLIB0_H_$(1))/$(CFG_STDLIB_$(4)): \
|
||||
$$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_STDLIB_$(4))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$$(STDLIB_GLOB) $$@
|
||||
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(STDLIB_GLOB_$(4)) $$@
|
||||
|
||||
$$(HLIB0_H_$(1))/$(CFG_LIBRUSTC): \
|
||||
$$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_LIBRUSTC)
|
||||
$$(HLIB0_H_$(1))/$(CFG_LIBRUSTC_$(4)): \
|
||||
$$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_LIBRUSTC_$(4))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$$(LIBRUSTC_GLOB) $$@
|
||||
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(LIBRUSTC_GLOB_$(4)) $$@
|
||||
|
||||
$$(HLIB0_H_$(1))/$(CFG_RUSTLLVM): \
|
||||
$$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_RUSTLLVM)
|
||||
$$(HLIB0_H_$(1))/$(CFG_RUSTLLVM_$(4)): \
|
||||
$$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_RUSTLLVM_$(4))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
|
||||
|
|
24
mk/target.mk
24
mk/target.mk
|
@ -22,25 +22,25 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a: \
|
|||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUNTIME): \
|
||||
rt/$(2)/$$(CFG_RUNTIME)
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUNTIME_$(2)): \
|
||||
rt/$(2)/$(CFG_RUNTIME_$(2))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB): \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB_$(2)): \
|
||||
$$(CORELIB_CRATE) $$(CORELIB_INPUTS) \
|
||||
$$(TSREQ$(1)_T_$(2)_H_$(3))
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< && touch $$@
|
||||
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB): \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)): \
|
||||
$$(STDLIB_CRATE) $$(STDLIB_INPUTS) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB_$(2)) \
|
||||
$$(TSREQ$(1)_T_$(2)_H_$(3))
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< && touch $$@
|
||||
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX): \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(3)): \
|
||||
$$(LIBSYNTAX_CRATE) $$(LIBSYNTAX_INPUTS) \
|
||||
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
|
||||
$$(TCORELIB_DEFAULT$(1)_T_$(2)_H_$(3)) \
|
||||
|
@ -51,21 +51,21 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX): \
|
|||
# Only build the compiler for host triples
|
||||
ifneq ($$(findstring $(2),$$(CFG_HOST_TRIPLES)),)
|
||||
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM): \
|
||||
rustllvm/$(2)/$$(CFG_RUSTLLVM)
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUSTLLVM_$(3)): \
|
||||
rustllvm/$(2)/$(CFG_RUSTLLVM_$(3))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC): \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)): \
|
||||
$$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM)
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(3)) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUSTLLVM_$(3))
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< && touch $$@
|
||||
|
||||
$$(TBIN$(1)_T_$(2)_H_$(3))/rustc$$(X): \
|
||||
$$(DRIVER_CRATE) \
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC)
|
||||
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3))
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(2)_H_$(3)) --cfg rustc -o $$@ $$<
|
||||
ifdef CFG_ENABLE_PAX_FLAGS
|
||||
|
|
114
mk/tools.mk
114
mk/tools.mk
|
@ -38,86 +38,86 @@ RUST_INPUTS := $(wildcard $(S)src/librust/*.rs)
|
|||
# have tools that need to built for other targets.
|
||||
define TOOLS_STAGE_N_TARGET
|
||||
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBFUZZER): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBFUZZER_$(3)): \
|
||||
$$(FUZZER_LIB) $$(FUZZER_INPUTS) \
|
||||
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTC)
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_CORELIB_$(3)) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(3)) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(3))
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@
|
||||
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/fuzzer$$(X): \
|
||||
$$(DRIVER_CRATE) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBFUZZER)
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBFUZZER_$(3))
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg fuzzer -o $$@ $$<
|
||||
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/compiletest$$(X): \
|
||||
$$(COMPILETEST_CRATE) $$(COMPILETEST_INPUTS) \
|
||||
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB)
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_CORELIB_$(3)) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(3))
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$<
|
||||
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTPKG): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTPKG_$(3)): \
|
||||
$$(RUSTPKG_LIB) $$(RUSTPKG_INPUTS) \
|
||||
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTC)
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_CORELIB_$(3)) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(3)) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(3))
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@
|
||||
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/rustpkg$$(X): \
|
||||
$$(DRIVER_CRATE) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTPKG)
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTPKG_$(3))
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rustpkg -o $$@ $$<
|
||||
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTDOC): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOC_$(3)): \
|
||||
$$(RUSTDOC_LIB) $$(RUSTDOC_INPUTS) \
|
||||
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTC)
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_CORELIB_$(3)) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(3)) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(3))
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@
|
||||
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/rustdoc$$(X): \
|
||||
$$(DRIVER_CRATE) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTDOC)
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOC_$(3))
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rustdoc -o $$@ $$<
|
||||
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTI): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTI_$(3)): \
|
||||
$$(RUSTI_LIB) $$(RUSTI_INPUTS) \
|
||||
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTC)
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_CORELIB_$(3)) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(3)) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(3))
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@
|
||||
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/rusti$$(X): \
|
||||
$$(DRIVER_CRATE) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTI)
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTI_$(3))
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rusti -o $$@ $$<
|
||||
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUST): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUST_$(3)): \
|
||||
$$(RUST_LIB) $$(RUST_INPUTS) \
|
||||
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTC)
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_CORELIB_$(3)) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(3)) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(3))
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@
|
||||
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/rust$$(X): \
|
||||
$$(DRIVER_CRATE) \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUST)
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUST_$(3))
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rust -o $$@ $$<
|
||||
|
||||
|
@ -129,19 +129,19 @@ define TOOLS_STAGE_N_HOST
|
|||
# Promote the stageN target to stageN+1 host
|
||||
# FIXME: Shouldn't need to depend on host/librustc.so once
|
||||
# rpath is working
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBFUZZER): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBFUZZER) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_LIBFUZZER_$(3)): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBFUZZER_$(3)) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTC_$(3)) \
|
||||
$$(HSREQ$(2)_H_$(4))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBFUZZER_GLOB) \
|
||||
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBFUZZER_DSYM_GLOB)) \
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBFUZZER_GLOB_$(3)) \
|
||||
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBFUZZER_DSYM_GLOB_$(3))) \
|
||||
$$(HLIB$(2)_H_$(4))
|
||||
|
||||
$$(HBIN$(2)_H_$(4))/fuzzer$$(X): \
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/fuzzer$$(X) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBFUZZER) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_LIBFUZZER_$(3)) \
|
||||
$$(HSREQ$(2)_H_$(4))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
|
@ -153,70 +153,70 @@ $$(HBIN$(2)_H_$(4))/compiletest$$(X): \
|
|||
$$(Q)cp $$< $$@
|
||||
|
||||
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTPKG): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTPKG) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTPKG_$(3)): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTPKG_$(3)) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTC_$(3)) \
|
||||
$$(HSREQ$(2)_H_$(4))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTPKG_GLOB) \
|
||||
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTPKG_DSYM_GLOB)) \
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTPKG_GLOB_$(3)) \
|
||||
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTPKG_DSYM_GLOB_$(3))) \
|
||||
$$(HLIB$(2)_H_$(4))
|
||||
|
||||
$$(HBIN$(2)_H_$(4))/rustpkg$$(X): \
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/rustpkg$$(X) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTPKG) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTPKG_$(3)) \
|
||||
$$(HSREQ$(2)_H_$(4))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTDOC): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTDOC) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTDOC_$(3)): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOC_$(3)) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTC_$(3)) \
|
||||
$$(HSREQ$(2)_H_$(4))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTDOC_GLOB) \
|
||||
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTDOC_DSYM_GLOB)) \
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTDOC_GLOB_$(3)) \
|
||||
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTDOC_DSYM_GLOB_$(3))) \
|
||||
$$(HLIB$(2)_H_$(4))
|
||||
|
||||
$$(HBIN$(2)_H_$(4))/rustdoc$$(X): \
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/rustdoc$$(X) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTDOC) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTDOC_$(3)) \
|
||||
$$(HSREQ$(2)_H_$(4))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTI): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTI) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTI_$(3)): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTI_$(3)) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTC_$(3)) \
|
||||
$$(HSREQ$(2)_H_$(4))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTI_GLOB) \
|
||||
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTI_DSYM_GLOB)) \
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTI_GLOB_$(3)) \
|
||||
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTI_DSYM_GLOB_$(3))) \
|
||||
$$(HLIB$(2)_H_$(4))
|
||||
|
||||
$$(HBIN$(2)_H_$(4))/rusti$$(X): \
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/rusti$$(X) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTI) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTI_$(3)) \
|
||||
$$(HSREQ$(2)_H_$(4))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUST): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUST) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUST_$(3)): \
|
||||
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUST_$(3)) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTC_$(3)) \
|
||||
$$(HSREQ$(2)_H_$(4))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUST_GLOB) \
|
||||
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUST_DSYM_GLOB)) \
|
||||
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUST_GLOB_$(3)) \
|
||||
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUST_DSYM_GLOB)_$(3)) \
|
||||
$$(HLIB$(2)_H_$(4))
|
||||
|
||||
$$(HBIN$(2)_H_$(4))/rust$$(X): \
|
||||
$$(TBIN$(1)_T_$(4)_H_$(3))/rust$$(X) \
|
||||
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUST) \
|
||||
$$(HLIB$(2)_H_$(4))/$(CFG_LIBRUST_$(3)) \
|
||||
$$(HSREQ$(2)_H_$(4))
|
||||
@$$(call E, cp: $$@)
|
||||
$$(Q)cp $$< $$@
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
.text
|
||||
.code 32
|
||||
.arm
|
||||
.align
|
||||
|
||||
.globl __morestack
|
||||
.hidden __morestack
|
||||
__morestack:
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include "rust_android_dummy.h"
|
||||
#include <math.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef __ANDROID__
|
||||
|
||||
|
@ -13,6 +14,9 @@ char **backtrace_symbols(void *const *array, int size) { return 0; }
|
|||
|
||||
void backtrace_symbols_fd (void *const *array, int size, int fd) {}
|
||||
|
||||
extern "C" volatile int* __errno_location() {
|
||||
return &errno;
|
||||
}
|
||||
|
||||
extern "C" float log2f(float f)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue