summaryrefslogtreecommitdiff
path: root/cmake/modules/AddLLVM.cmake
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2013-12-29 16:15:26 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2013-12-29 16:15:26 +0000
commita1d32ccea85d84683b4ca75aa38eb56dbd61d5d2 (patch)
tree859b553bca85afec7eb5751bc5991226356357c3 /cmake/modules/AddLLVM.cmake
parentd9c748443064e8e662820a703832caed43fa8e8a (diff)
downloadllvm-a1d32ccea85d84683b4ca75aa38eb56dbd61d5d2.tar.gz
llvm-a1d32ccea85d84683b4ca75aa38eb56dbd61d5d2.tar.bz2
llvm-a1d32ccea85d84683b4ca75aa38eb56dbd61d5d2.tar.xz
[CMake] add_llvm_symbol_exports: Use unique name for each target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198164 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/modules/AddLLVM.cmake')
-rw-r--r--cmake/modules/AddLLVM.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index 83954bed86..4588919965 100644
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -4,7 +4,7 @@ include(LLVM-Config)
function(add_llvm_symbol_exports target_name export_file)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- set(native_export_file "symbol.exports")
+ set(native_export_file "${target_name}.exports")
add_custom_command(OUTPUT ${native_export_file}
COMMAND sed -e "s/^/_/" < ${export_file} > ${native_export_file}
DEPENDS ${export_file}
@@ -14,7 +14,7 @@ function(add_llvm_symbol_exports target_name export_file)
LINK_FLAGS " -Wl,-exported_symbols_list,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
elseif(LLVM_HAVE_LINK_VERSION_SCRIPT)
# Gold and BFD ld require a version script rather than a plain list.
- set(native_export_file "symbol.exports")
+ set(native_export_file "${target_name}.exports")
# FIXME: Don't write the "local:" line on OpenBSD.
add_custom_command(OUTPUT ${native_export_file}
COMMAND echo "{" > ${native_export_file}
@@ -28,7 +28,7 @@ function(add_llvm_symbol_exports target_name export_file)
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
else()
- set(native_export_file "symbol.def")
+ set(native_export_file "${target_name}.def")
set(CAT "type")
if(CYGWIN)