From c785b4f4a613f3e553651f7c0dbed4c6d8b5af47 Mon Sep 17 00:00:00 2001
From: Evan Cheng <evan.cheng@apple.com>
Date: Mon, 9 Mar 2009 18:28:37 +0000
Subject: [PATCH] Re-apply 66315, but restrict it to Darwin only.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66427 91177308-0d34-0410-b5e6-96231b3b80d8
---
 Makefile.rules | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Makefile.rules b/Makefile.rules
index bf13b26200c0..3c115d2a52e0 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -519,6 +519,16 @@ ifdef UNIVERSAL
 
   # Building universal cannot compute dependencies automatically.
   DISABLE_AUTO_DEPENDENCIES=1
+else
+  ifeq ($(OS),Darwin)
+    ifeq ($(ARCH),x86_64)
+      CompileCommonOpts += -m64
+    else
+      ifeq ($(ARCH),x86)
+        CompileCommonOpts += -m32
+      endif
+    endif
+  endif
 endif
 
 ifeq ($(OS),SunOS)
-- 
GitLab