Do not pass optimization flags to Solaris' linker.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 22 Jun 2015 12:41:52 +0000 (12:41 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 22 Jun 2015 12:41:52 +0000 (12:41 +0000)
It is not supported.

Patch by Xan L√≥pez.

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

cmake/modules/AddLLVM.cmake

index b7d4976..67c20a2 100644 (file)
@@ -168,7 +168,7 @@ function(add_link_opts target_name)
 
     # Pass -O3 to the linker. This enabled different optimizations on different
     # linkers.
-    if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32))
+    if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin|SunOS" OR WIN32))
       set_property(TARGET ${target_name} APPEND_STRING PROPERTY
                    LINK_FLAGS " -Wl,-O3")
     endif()