Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit a1d32cc

Browse files
committed
[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
1 parent d9c7484 commit a1d32cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmake/modules/AddLLVM.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ include(LLVM-Config)
44

55
function(add_llvm_symbol_exports target_name export_file)
66
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
7-
set(native_export_file "symbol.exports")
7+
set(native_export_file "${target_name}.exports")
88
add_custom_command(OUTPUT ${native_export_file}
99
COMMAND sed -e "s/^/_/" < ${export_file} > ${native_export_file}
1010
DEPENDS ${export_file}
@@ -14,7 +14,7 @@ function(add_llvm_symbol_exports target_name export_file)
1414
LINK_FLAGS " -Wl,-exported_symbols_list,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
1515
elseif(LLVM_HAVE_LINK_VERSION_SCRIPT)
1616
# Gold and BFD ld require a version script rather than a plain list.
17-
set(native_export_file "symbol.exports")
17+
set(native_export_file "${target_name}.exports")
1818
# FIXME: Don't write the "local:" line on OpenBSD.
1919
add_custom_command(OUTPUT ${native_export_file}
2020
COMMAND echo "{" > ${native_export_file}
@@ -28,7 +28,7 @@ function(add_llvm_symbol_exports target_name export_file)
2828
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
2929
LINK_FLAGS " -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
3030
else()
31-
set(native_export_file "symbol.def")
31+
set(native_export_file "${target_name}.def")
3232

3333
set(CAT "type")
3434
if(CYGWIN)

0 commit comments

Comments
 (0)