Mercurial > hg > CbC > CbC_llvm
view compiler-rt/cmake/Modules/CompilerRTLink.cmake @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children |
line wrap: on
line source
# Link a shared library with COMPILER_RT_TEST_COMPILER. # clang_link_shared(<output.so> # OBJECTS <list of input objects> # LINK_FLAGS <list of link flags> # DEPS <list of dependencies>) macro(clang_link_shared so_file) cmake_parse_arguments(SOURCE "" "" "OBJECTS;LINK_FLAGS;DEPS" ${ARGN}) if(NOT COMPILER_RT_STANDALONE_BUILD) list(APPEND SOURCE_DEPS clang) endif() add_custom_command( OUTPUT ${so_file} COMMAND ${COMPILER_RT_TEST_COMPILER} -o "${so_file}" -shared ${SOURCE_LINK_FLAGS} ${SOURCE_OBJECTS} DEPENDS ${SOURCE_DEPS}) endmacro()