Move to SRC_DIR, instead of copy, after downloading toolchain source
At 3.2GB, "move" can save lots of time compared to "copy"
Also, add more logging when adding c++ libraries dependencies
Change-Id: If220bd299e15c3015af8e30510604635eaadfa53
diff --git a/build/core/definitions.mk b/build/core/definitions.mk
index 7bdc711..1d989e2 100644
--- a/build/core/definitions.mk
+++ b/build/core/definitions.mk
@@ -932,7 +932,9 @@
# $3: list of C++ runtime shared libraries (if any)
#
module-add-c++-deps = \
+ $(if $(call strip,$2),$(call ndk_log,Add dependency '$(call strip,$2)' to module '$1'))\
$(eval __ndk_modules.$1.STATIC_LIBRARIES += $(2))\
+ $(if $(call strip,$3),$(call ndk_log,Add dependency '$(call strip,$3)' to module '$1'))\
$(eval __ndk_modules.$1.SHARED_LIBRARIES += $(3))
diff --git a/build/tools/download-toolchain-sources.sh b/build/tools/download-toolchain-sources.sh
index ff6f80c..026d1e6 100755
--- a/build/tools/download-toolchain-sources.sh
+++ b/build/tools/download-toolchain-sources.sh
@@ -259,9 +259,10 @@
SRC_DIR=`cd $SRC_DIR && pwd`
rm -rf $SRC_DIR && mkdir -p $SRC_DIR
fail_panic "Could not create target source directory: $SRC_DIR"
- copy_directory "$TMPDIR" "$SRC_DIR"
cp $SOURCES_LIST $SRC_DIR/SOURCES
- fail_panic "Could not copy downloaded sources to: $SRC_DIR"
+ fail_panic "Could not copy $SOURCES_LIST to $SRC_DIR"
+ mv "$TMPDIR"/* "$SRC_DIR" #copy_directory "$TMPDIR" "$SRC_DIR"
+ fail_panic "Could not move to target source directory: $TMPDIR -> $SRC_DIR"
dump "Toolchain sources downloaded and copied to $SRC_DIR"
fi