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 | f45d92bb22a999e405b9fdf9c92d12ff6eaed6e4 (patch) | |
| tree | aa67b55da32e90a87f953bcc3112b125e9e9d77f /compiler-rt/cmake/Modules/CompilerRTLink.cmake | |
| parent | 788381b8ac378dcde69a361a72a9ed477f552bdc (diff) | |
| download | bcm5719-llvm-f45d92bb22a999e405b9fdf9c92d12ff6eaed6e4.tar.gz bcm5719-llvm-f45d92bb22a999e405b9fdf9c92d12ff6eaed6e4.zip | |
MemorySanitizer unit tests.
llvm-svn: 171062
Diffstat (limited to 'compiler-rt/cmake/Modules/CompilerRTLink.cmake')
| -rw-r--r-- | compiler-rt/cmake/Modules/CompilerRTLink.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/compiler-rt/cmake/Modules/CompilerRTLink.cmake b/compiler-rt/cmake/Modules/CompilerRTLink.cmake new file mode 100644 index 00000000000..85030a725e1 --- /dev/null +++ b/compiler-rt/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() |

