summaryrefslogtreecommitdiffstats
path: root/core/definitions.mk
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2014-05-27 19:44:19 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-27 19:44:19 +0000
commita5b0b1303d38fb1cd31575383c647eb8b1db5e36 (patch)
tree4888c10acd85e14e109c9648581f50c06e271eef /core/definitions.mk
parent212772f6322ef41a1b18023d15eb2b69efa19be8 (diff)
parent3805f619156163eab8ad92fd51b4a431be1287bd (diff)
downloadbuild-a5b0b1303d38fb1cd31575383c647eb8b1db5e36.zip
build-a5b0b1303d38fb1cd31575383c647eb8b1db5e36.tar.gz
build-a5b0b1303d38fb1cd31575383c647eb8b1db5e36.tar.bz2
am 3805f619: Merge "Revert "Fix for duplicate names in whole static libs""
* commit '3805f619156163eab8ad92fd51b4a431be1287bd': Revert "Fix for duplicate names in whole static libs"
Diffstat (limited to 'core/definitions.mk')
-rw-r--r--core/definitions.mk40
1 files changed, 20 insertions, 20 deletions
diff --git a/core/definitions.mk b/core/definitions.mk
index e075c2d..4651335 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -1167,16 +1167,16 @@ endef
# $(1): the full path of the source static library.
define _extract-and-include-single-target-whole-static-lib
@echo "preparing StaticLib: $(PRIVATE_MODULE) [including $(1)]"
-$(hide) \
- for f in `$($(PRIVATE_2ND_ARCH_VAR_PREFIX)TARGET_AR) t $(1) | sort | uniq`; do \
- i=0; \
- for ff in `$($(PRIVATE_2ND_ARCH_VAR_PREFIX)TARGET_AR) t $(1) $$f`; do \
- i=$$(($$i + 1)); \
- $($(PRIVATE_2ND_ARCH_VAR_PREFIX)TARGET_AR) xN $$i $(1) $$f; \
- $($(PRIVATE_2ND_ARCH_VAR_PREFIX)TARGET_AR) \
- $(PRIVATE_ARFLAGS) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_ARFLAGS) $@ $$f; \
- done ; \
- done ;
+$(hide) ldir=$(PRIVATE_INTERMEDIATES_DIR)/WHOLE/$(basename $(notdir $(1)))_objs;\
+ rm -rf $$ldir; \
+ mkdir -p $$ldir; \
+ filelist=; \
+ for f in `$($(PRIVATE_2ND_ARCH_VAR_PREFIX)TARGET_AR) t $(1)`; do \
+ $($(PRIVATE_2ND_ARCH_VAR_PREFIX)TARGET_AR) p $(1) $$f > $$ldir/$$f; \
+ filelist="$$filelist $$ldir/$$f"; \
+ done ; \
+ $($(PRIVATE_2ND_ARCH_VAR_PREFIX)TARGET_AR) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_ARFLAGS) \
+ $(PRIVATE_ARFLAGS) $@ $$filelist
endef
@@ -1204,16 +1204,16 @@ endef
# $(1): the full path of the source static library.
define _extract-and-include-single-host-whole-static-lib
@echo "preparing StaticLib: $(PRIVATE_MODULE) [including $(1)]"
-$(hide) \
- for f in `$($(PRIVATE_2ND_ARCH_VAR_PREFIX)HOST_AR) t $(1) | \grep '\.o$$' | sort | uniq`; do \
- i=0; \
- for ff in `$($(PRIVATE_2ND_ARCH_VAR_PREFIX)HOST_AR) t $(1) $$f`; do \
- i=$$(($$i + 1)); \
- $($(PRIVATE_2ND_ARCH_VAR_PREFIX)HOST_AR) xN $$i $(1) $$f; \
- $($(PRIVATE_2ND_ARCH_VAR_PREFIX)HOST_AR) \
- $(PRIVATE_ARFLAGS) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)HOST_GLOBAL_ARFLAGS) $@ $$f; \
- done ; \
- done ;
+$(hide) ldir=$(PRIVATE_INTERMEDIATES_DIR)/WHOLE/$(basename $(notdir $(1)))_objs;\
+ rm -rf $$ldir; \
+ mkdir -p $$ldir; \
+ filelist=; \
+ for f in `$($(PRIVATE_2ND_ARCH_VAR_PREFIX)HOST_AR) t $(1) | \grep '\.o$$'`; do \
+ $($(PRIVATE_2ND_ARCH_VAR_PREFIX)HOST_AR) p $(1) $$f > $$ldir/$$f; \
+ filelist="$$filelist $$ldir/$$f"; \
+ done ; \
+ $($(PRIVATE_2ND_ARCH_VAR_PREFIX)HOST_AR) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)HOST_GLOBAL_ARFLAGS) \
+ $(PRIVATE_ARFLAGS) $@ $$filelist
endef