Re-add link time optimization on OS X
authorDaylen Yang <services@daylenyang.com>
Fri, 14 Mar 2014 05:09:29 +0000 (22:09 -0700)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 14 Mar 2014 07:49:08 +0000 (08:49 +0100)
In the new version of clang, -O4 does not imply -flto, so we set the
flag

src/Makefile

index 9b8e926..dbf8143 100644 (file)
@@ -271,14 +271,10 @@ ifeq ($(optimize),yes)
        endif
 
        ifeq ($(comp),clang)
-               ifeq ($(os),osx)
-                       # Clang on OS X supports LTO
-                       CXXFLAGS += -O4
-               else
-                       CXXFLAGS += -O3
-               endif
+               CXXFLAGS += -O3
 
                ifeq ($(os),osx)
+                       CXXFLAGS += -flto
                        ifeq ($(arch),i386)
                                CXXFLAGS += -mdynamic-no-pic
                        endif