Bug 1476874 - Only link object once in static libraries. r?build
--- 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.