aboutsummaryrefslogtreecommitdiff
path: root/cmake/Modules/CompilerRTLink.cmake
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-01-07 19:55:37 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-01-07 19:55:37 +0000
commitca9211ecdede9bdedb812b2243a4abdb8dacd1b9 (patch)
tree9b19e801150082c33e9152275829a6ce90614b55 /cmake/Modules/CompilerRTLink.cmake
parent8ef50bf3d1c287b5013c3168de77a462dfce3495 (diff)
downloadsrc-ca9211ecdede9bdedb812b2243a4abdb8dacd1b9.tar.gz
src-ca9211ecdede9bdedb812b2243a4abdb8dacd1b9.zip
Import compiler-rt trunk r224034.vendor/compiler-rt/compiler-rt-r224034
Notes
Notes: svn path=/vendor/compiler-rt/dist/; revision=276789 svn path=/vendor/compiler-rt/compiler-rt-r224034/; revision=276790; tag=vendor/compiler-rt/compiler-rt-r224034
Diffstat (limited to 'cmake/Modules/CompilerRTLink.cmake')
-rw-r--r--cmake/Modules/CompilerRTLink.cmake10
1 files changed, 7 insertions, 3 deletions
diff --git a/cmake/Modules/CompilerRTLink.cmake b/cmake/Modules/CompilerRTLink.cmake
index 85030a725e19..0f0e53a3b2f4 100644
--- a/cmake/Modules/CompilerRTLink.cmake
+++ b/cmake/Modules/CompilerRTLink.cmake
@@ -1,14 +1,18 @@
include(LLVMParseArguments)
-# Link a shared library with just-built Clang.
+# Link a shared library with COMPILER_RT_TEST_COMPILER.
# clang_link_shared(<output.so>
# OBJECTS <list of input objects>
# LINKFLAGS <list of link flags>
# DEPS <list of dependencies>)
macro(clang_link_shared so_file)
parse_arguments(SOURCE "OBJECTS;LINKFLAGS;DEPS" "" ${ARGN})
+ if(NOT COMPILER_RT_STANDALONE_BUILD)
+ list(APPEND SOURCE_DEPS clang)
+ endif()
add_custom_command(
OUTPUT ${so_file}
- COMMAND clang -o "${so_file}" -shared ${SOURCE_LINKFLAGS} ${SOURCE_OBJECTS}
- DEPENDS clang ${SOURCE_DEPS})
+ COMMAND ${COMPILER_RT_TEST_COMPILER} -o "${so_file}" -shared
+ ${SOURCE_LINKFLAGS} ${SOURCE_OBJECTS}
+ DEPENDS ${SOURCE_DEPS})
endmacro()