Remove duplicate files in COMMON_SRCS

This CL removes duplicate files in COMMON_SRCS
by sorting the files. Multiple targets might
depend on a single file, so that file might
be included in COMMON_SRCS more than once.

Bug: 301289643
Change-Id: Ie143971894b15bb675ecbf524c54c59da58783a2
Test: Presubmits
diff --git a/build/build_template.mk b/build/build_template.mk
index 938f84a..7d52d87 100644
--- a/build/build_template.mk
+++ b/build/build_template.mk
@@ -51,6 +51,9 @@
 
 # Target Objects ###############################################################
 
+# Remove duplicates
+COMMON_SRCS := $(sort $(COMMON_SRCS))
+
 # Source files.
 $(1)_CC_SRCS = $$(filter %.cc, $(COMMON_SRCS) $(8))
 $(1)_CPP_SRCS = $$(filter %.cpp, $(COMMON_SRCS) $(8))