[llvm] r240275 - Use right syntax to pass version script to Solaris' ld.
Rafael Espindola
rafael.espindola at gmail.com
Mon Jun 22 05:34:54 PDT 2015
Author: rafael
Date: Mon Jun 22 07:34:54 2015
New Revision: 240275
URL: http://llvm.org/viewvc/llvm-project?rev=240275&view=rev
Log:
Use right syntax to pass version script to Solaris' ld.
Patch by Xan Lopez!
Modified:
llvm/trunk/cmake/modules/AddLLVM.cmake
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=240275&r1=240274&r2=240275&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Mon Jun 22 07:34:54 2015
@@ -83,8 +83,13 @@ function(add_llvm_symbol_exports target_
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")
More information about the llvm-commits
mailing list