build: Add support for a TOOL_ORDER_FILE variable so commands can build with an
order file on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114050 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Makefile.rules b/Makefile.rules
index efafc82..ee17b99 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -1326,6 +1326,18 @@
endif
#---------------------------------------------------------
+# Tool Order File Support
+#---------------------------------------------------------
+
+ifeq ($(HOST_OS),Darwin)
+ifdef TOOL_ORDER_FINE
+
+LD.Flags += -Wl,-order_file,$(TOOL_ORDER_FILE)
+
+endif
+endif
+
+#---------------------------------------------------------
# Tool Version Info Support
#---------------------------------------------------------