From d7ca5be1d8eb7168129bbdb39ea556e6af46620d Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Wed, 13 Jun 2018 07:08:28 +0000 Subject: [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 --- cmake/Modules/AddCompilerRT.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cmake/Modules') 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 # SOURCES # CFLAGS -# DEFS ) +# DEFS +# DEPS ) 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}) -- cgit v1.2.3