diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-12-25 12:39:56 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-12-25 12:39:56 +0000 |
commit | 0231c50f42e735739041f3b4b4ce17e1742bed69 (patch) | |
tree | ecbef2c2cc839771ee6fa59694daef1ab675cafc /cmake/Modules/CompilerRTLink.cmake | |
parent | 97edeb3e6270b05cb3ece0d5b6f0ea1f0ba1398a (diff) | |
download | compiler-rt-0231c50f42e735739041f3b4b4ce17e1742bed69.tar.gz compiler-rt-0231c50f42e735739041f3b4b4ce17e1742bed69.tar.bz2 compiler-rt-0231c50f42e735739041f3b4b4ce17e1742bed69.tar.xz |
MemorySanitizer unit tests.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@171062 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/Modules/CompilerRTLink.cmake')
-rw-r--r-- | cmake/Modules/CompilerRTLink.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cmake/Modules/CompilerRTLink.cmake b/cmake/Modules/CompilerRTLink.cmake new file mode 100644 index 00000000..85030a72 --- /dev/null +++ b/cmake/Modules/CompilerRTLink.cmake @@ -0,0 +1,14 @@ +include(LLVMParseArguments) + +# Link a shared library with just-built Clang. +# 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}) + add_custom_command( + OUTPUT ${so_file} + COMMAND clang -o "${so_file}" -shared ${SOURCE_LINKFLAGS} ${SOURCE_OBJECTS} + DEPENDS clang ${SOURCE_DEPS}) +endmacro() |