Use right syntax to pass version script to Solaris' ld.

Patch by Xan Lopez!

llvm-svn: 240275
This commit is contained in:
Rafael Espindola 2015-06-22 12:34:54 +00:00
parent fb9d125592
commit ec1d069d70
1 changed files with 7 additions and 2 deletions

View File

@ -83,8 +83,13 @@ function(add_llvm_symbol_exports target_name export_file)
DEPENDS ${export_file}
VERBATIM
COMMENT "Creating export file for ${target_name}")
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,-M,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
else()
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
endif()
else()
set(native_export_file "${target_name}.def")