pass -mmacosx-version-min to the compiler and linker, which makes the build
authorChris Lattner <sabre@nondot.org>
Thu, 26 Feb 2009 17:44:38 +0000 (17:44 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 26 Feb 2009 17:44:38 +0000 (17:44 +0000)
substantially happier on some versions of Mac OS/X.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65542 91177308-0d34-0410-b5e6-96231b3b80d8

Makefile.rules

index f6b697e1605b582391cd9310af53d63930290037..c9251e7e6376d4c394259804e561a118f685baeb 100644 (file)
@@ -444,7 +444,10 @@ endif
 endif
 
 ifeq ($(OS),Darwin)
-  SharedLinkOptions=-Wl,-flat_namespace -Wl,-undefined -Wl,suppress -bundle
+  DARWIN_VERSION := `sw_vers -productVersion`
+  SharedLinkOptions=-Wl,-flat_namespace -Wl,-undefined -Wl,suppress -bundle \
+                    -mmacosx-version-min=$(DARWIN_VERSION)
+  CompileCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION)
 else
   SharedLinkOptions=-shared
 endif
@@ -453,7 +456,7 @@ endif
 # Options To Invoke Tools
 #----------------------------------------------------------
 
-CompileCommonOpts := -pedantic -Wall -W -Wwrite-strings -Wno-long-long \
+CompileCommonOpts += -pedantic -Wall -W -Wwrite-strings -Wno-long-long \
                      -Wunused -Wno-unused-parameter $(EXTRA_OPTIONS)
 
 ifeq ($(OS),HP-UX)