Merge "Improve dotdot workaround when src begins with '/'"
am: 7918e5121a

Change-Id: I049e8fa30b713f3aceeb1ca579e2550f22c4a10d
diff --git a/core/binary.mk b/core/binary.mk
index 0f9ef2f..28ac56f 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -324,6 +324,10 @@
 endif
 my_src_files := $(filter-out $(my_src_files_exclude),$(my_src_files))
 
+# Strip '/' from the beginning of each src file. This helps the ../ detection in case
+# the source file is in the form of /../file
+my_src_files := $(patsubst /%,%,$(my_src_files))
+
 my_clang := $(strip $(LOCAL_CLANG))
 ifdef LOCAL_CLANG_$(my_32_64_bit_suffix)
 my_clang := $(strip $(LOCAL_CLANG_$(my_32_64_bit_suffix)))