Bug 1476874 - Only link object once in static libraries. r?build draft
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 19 Jul 2018 16:30:19 +0900
changeset 820234 e966bd76c941d0a55ece284a3996136eba886e1f
parent 820233 eb9d9de4647dff688891715fce0c85ddeb2d6532
child 820235 3332b9e15b3d01aed5d88ef16685c6a6cbc0df12
push id116760
push userbmo:mh+mozilla@glandium.org
push dateThu, 19 Jul 2018 07:31:06 +0000
reviewersbuild
bugs1476874
milestone63.0a1
Bug 1476874 - Only link object once in static libraries. r?build
config/rules.mk
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -647,17 +647,17 @@ endif
 endif
 ifndef CROSS_COMPILE
 	$(call py_action,check_binary,--host $@)
 endif
 
 $(LIBRARY): $(OBJS) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
 	$(REPORT_BUILD)
 	$(RM) $(REAL_LIBRARY)
-	$(AR) $(AR_FLAGS) $(OBJS) $($@_$(OBJS_VAR_SUFFIX))
+	$(AR) $(AR_FLAGS) $($@_$(OBJS_VAR_SUFFIX))
 
 ifeq ($(OS_ARCH),WINNT)
 # Import libraries are created by the rules creating shared libraries.
 # The rules to copy them to $(DIST)/lib depend on $(IMPORT_LIBRARY),
 # but make will happily consider the import library before it is refreshed
 # when rebuilding the corresponding shared library. Defining an empty recipe
 # for import libraries forces make to wait for the shared library recipe to
 # have run before considering other targets that depend on the import library.