From 88e0980ddf65b378858137e8564d32eabe6c1a74 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Thu, 21 Mar 2019 15:19:16 +0900 Subject: [PATCH] Follow symlink when creating symbols.zip Due to the runtime APEX, the symbols directory now contains a symlink; ./apex/com.android.runtime -> com.android.runtime.debug (or .release). Previously, this symlink itself was included in the symbols.zip file. And this is causing problem to the online stack tool which does not follow the symlink in the zip file. Instead of fixing the problem in the stack tool side, this change let the packaging routine to follow the symlink and copy the files behind the symlink as if they were under a directory that isn't a symlink. (i.e. ./apex/com.android.runtime/bin/dex2oat is added) Bug: 120846816 Test: m dist with marlin (flattened) and blueline (non-flattened) examine symbols.zip file and check that unstripped shared libraries are found under /apex/com.android.runtime directory Change-Id: I1d1c787a2e8ab7209410dfa2cff749a7042e21b0 --- core/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Makefile b/core/Makefile index a0aa94f1db..72b6ba21ba 100644 --- a/core/Makefile +++ b/core/Makefile @@ -4234,7 +4234,7 @@ $(SYMBOLS_ZIP): $(SOONG_ZIP) @echo "Package symbols: $@" $(hide) rm -rf $@ $(PRIVATE_LIST_FILE) $(hide) mkdir -p $(dir $@) $(TARGET_OUT_UNSTRIPPED) $(dir $(PRIVATE_LIST_FILE)) - $(hide) find $(TARGET_OUT_UNSTRIPPED) | sort >$(PRIVATE_LIST_FILE) + $(hide) find -L $(TARGET_OUT_UNSTRIPPED) -type f | sort >$(PRIVATE_LIST_FILE) $(hide) $(SOONG_ZIP) -d -o $@ -C $(OUT_DIR)/.. -l $(PRIVATE_LIST_FILE) # ----------------------------------------------------------------- # A zip of the coverage directory.