diff --git a/llvm/Makefile.rules b/llvm/Makefile.rules index bf13b26200c0..3c115d2a52e0 100644 --- a/llvm/Makefile.rules +++ b/llvm/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)