blob: 85030a725e19ba3d50816521fae691f212f8285b [file] [log] [blame]
Evgeniy Stepanov0231c502012-12-25 12:39:56 +00001include(LLVMParseArguments)
2
3# Link a shared library with just-built Clang.
4# clang_link_shared(<output.so>
5# OBJECTS <list of input objects>
6# LINKFLAGS <list of link flags>
7# DEPS <list of dependencies>)
8macro(clang_link_shared so_file)
9 parse_arguments(SOURCE "OBJECTS;LINKFLAGS;DEPS" "" ${ARGN})
10 add_custom_command(
11 OUTPUT ${so_file}
12 COMMAND clang -o "${so_file}" -shared ${SOURCE_LINKFLAGS} ${SOURCE_OBJECTS}
13 DEPENDS clang ${SOURCE_DEPS})
14endmacro()