diff options
author | Petr Hosek <phosek@chromium.org> | 2018-06-13 07:08:28 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2018-06-13 07:08:28 +0000 |
commit | d7ca5be1d8eb7168129bbdb39ea556e6af46620d (patch) | |
tree | cea0ee1cb03311198b5c9b5d55d75d142625063e /cmake/Modules | |
parent | 5182c97e8f15d72eaac6b4b4ad93729130343011 (diff) |
[XRay] Set an explicit dependency on libc++ when needed
When XRay is being built as part of the just built compiler together
with libc++ as part of the runtimes build, we need an explicit
dependency from XRay to libc++ to make sure that the library is
available by the time we start building XRay.
Differential Revision: https://reviews.llvm.org/D48113
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@334575 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/Modules')
-rw-r--r-- | cmake/Modules/AddCompilerRT.cmake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake index 95432e298..be5b81f05 100644 --- a/cmake/Modules/AddCompilerRT.cmake +++ b/cmake/Modules/AddCompilerRT.cmake @@ -31,9 +31,10 @@ endfunction() # ARCHS <architectures> # SOURCES <source files> # CFLAGS <compile flags> -# DEFS <compile definitions>) +# DEFS <compile definitions> +# DEPS <dependencies>) function(add_compiler_rt_object_libraries name) - cmake_parse_arguments(LIB "" "" "OS;ARCHS;SOURCES;CFLAGS;DEFS" ${ARGN}) + cmake_parse_arguments(LIB "" "" "OS;ARCHS;SOURCES;CFLAGS;DEFS;DEPS" ${ARGN}) set(libnames) if(APPLE) foreach(os ${LIB_OS}) @@ -56,6 +57,9 @@ function(add_compiler_rt_object_libraries name) foreach(libname ${libnames}) add_library(${libname} OBJECT ${LIB_SOURCES}) + if(LIB_DEPS) + add_dependencies(${libname} ${LIB_DEPS}) + endif() # Strip out -msse3 if this isn't macOS. set(target_flags ${LIB_CFLAGS}) |