Do not pass optimization flags to Solaris' linker.

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
This commit is contained in:
Rafael Espindola 2015-06-22 12:41:52 +00:00
parent 4c8ba2e74d
commit e16fa7fec8

View 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()