[compiler-rt] r239955 - [CMake] LSan is not actually available on Darwin.

Alexey Samsonov vonosmas at gmail.com
Wed Jun 17 20:48:56 PDT 2015


Sorry for breakage :-/ Thanks for reverting that, I'll prepare a fix
tomorrow.

On Wed, Jun 17, 2015 at 8:44 PM, Justin Bogner <mail at justinbogner.com>
wrote:

> Alexey Samsonov <vonosmas at gmail.com> writes:
> > Author: samsonov
> > Date: Wed Jun 17 17:24:44 2015
> > New Revision: 239955
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=239955&view=rev
> > Log:
> > [CMake] LSan is not actually available on Darwin.
>
> CMake fails entirely on Darwin after this change:
>
>     CMake Error at
> projects/compiler-rt/cmake/Modules/AddCompilerRT.cmake:58 (add_library):
>       Error evaluating generator expression:
>
>         $<TARGET_OBJECTS:RTInterception.x86_64>
>
>       Objects of target "RTInterception.x86_64" referenced but no such
> target
>       exists.
>     Call Stack (most recent call first):
>       projects/compiler-rt/lib/lsan/CMakeLists.txt:28
> (add_compiler_rt_runtime)
>
>
>     CMake Error: CMake can not determine linker language for target:
> clang_rt.lsan-x86_64
>
> Reverting seems to fix it, so I've done that to get my tree building
> again in r239985.
>
> > Modified:
> >     compiler-rt/trunk/cmake/config-ix.cmake
> >     compiler-rt/trunk/lib/lsan/CMakeLists.txt
> >     compiler-rt/trunk/test/lsan/CMakeLists.txt
> >
> > Modified: compiler-rt/trunk/cmake/config-ix.cmake
> > URL:
> >
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=239955&r1=239954&r2=239955&view=diff
> >
> ==============================================================================
> > --- compiler-rt/trunk/cmake/config-ix.cmake (original)
> > +++ compiler-rt/trunk/cmake/config-ix.cmake Wed Jun 17 17:24:44 2015
> > @@ -295,7 +295,7 @@ else()
> >  endif()
> >
> >  if (COMPILER_RT_HAS_SANITIZER_COMMON AND LSAN_SUPPORTED_ARCH AND
> > -    OS_NAME MATCHES "Darwin|Linux|FreeBSD")
> > +    OS_NAME MATCHES "Linux|FreeBSD")
> >    set(COMPILER_RT_HAS_LSAN TRUE)
> >  else()
> >    set(COMPILER_RT_HAS_LSAN FALSE)
> >
> > Modified: compiler-rt/trunk/lib/lsan/CMakeLists.txt
> > URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/CMakeLists.txt?rev=239955&r1=239954&r2=239955&view=diff
> >
> ==============================================================================
> > --- compiler-rt/trunk/lib/lsan/CMakeLists.txt (original)
> > +++ compiler-rt/trunk/lib/lsan/CMakeLists.txt Wed Jun 17 17:24:44 2015
> > @@ -24,17 +24,15 @@ add_compiler_rt_object_libraries(RTLSanC
> >      SOURCES ${LSAN_COMMON_SOURCES}
> >      CFLAGS ${LSAN_CFLAGS})
> >
> > -if(NOT APPLE)
> > -  foreach(arch ${LSAN_SUPPORTED_ARCH})
> > -    add_compiler_rt_runtime(clang_rt.lsan-${arch} ${arch} STATIC
> > -      SOURCES ${LSAN_SOURCES}
> > -              $<TARGET_OBJECTS:RTInterception.${arch}>
> > -              $<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
> > -              $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>
> > -              $<TARGET_OBJECTS:RTLSanCommon.${arch}>
> > -      CFLAGS ${LSAN_CFLAGS})
> > -    add_dependencies(lsan clang_rt.lsan-${arch})
> > -  endforeach()
> > -endif()
> > +foreach(arch ${LSAN_SUPPORTED_ARCH})
> > +  add_compiler_rt_runtime(clang_rt.lsan-${arch} ${arch} STATIC
> > +    SOURCES ${LSAN_SOURCES}
> > +            $<TARGET_OBJECTS:RTInterception.${arch}>
> > +            $<TARGET_OBJECTS:RTSanitizerCommon.${arch}>
> > +            $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}>
> > +            $<TARGET_OBJECTS:RTLSanCommon.${arch}>
> > +    CFLAGS ${LSAN_CFLAGS})
> > +  add_dependencies(lsan clang_rt.lsan-${arch})
> > +endforeach()
> >
> >  add_dependencies(compiler-rt lsan)
> >
> > Modified: compiler-rt/trunk/test/lsan/CMakeLists.txt
> > URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lsan/CMakeLists.txt?rev=239955&r1=239954&r2=239955&view=diff
> >
> ==============================================================================
> > --- compiler-rt/trunk/test/lsan/CMakeLists.txt (original)
> > +++ compiler-rt/trunk/test/lsan/CMakeLists.txt Wed Jun 17 17:24:44 2015
> > @@ -10,14 +10,12 @@ configure_lit_site_cfg(
> >    ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
> >    ${CMAKE_CURRENT_BINARY_DIR}/AsanConfig/lit.site.cfg)
> >
> > -if(NOT APPLE AND NOT ANDROID)
> > -  set(LSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
> > -  if(NOT COMPILER_RT_STANDALONE_BUILD)
> > -    list(APPEND LSAN_TEST_DEPS lsan asan)
> > -  endif()
> > -  add_lit_testsuite(check-lsan "Running the LeakSanitizer tests"
> > -    ${CMAKE_CURRENT_BINARY_DIR}/LsanConfig
> > -    ${CMAKE_CURRENT_BINARY_DIR}/AsanConfig
> > -    DEPENDS ${LSAN_TEST_DEPS})
> > -  set_target_properties(check-lsan PROPERTIES FOLDER "LSan tests")
> > +set(LSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
> > +if(NOT COMPILER_RT_STANDALONE_BUILD)
> > +  list(APPEND LSAN_TEST_DEPS lsan asan)
> >  endif()
> > +add_lit_testsuite(check-lsan "Running the LeakSanitizer tests"
> > +  ${CMAKE_CURRENT_BINARY_DIR}/LsanConfig
> > +  ${CMAKE_CURRENT_BINARY_DIR}/AsanConfig
> > +  DEPENDS ${LSAN_TEST_DEPS})
> > +set_target_properties(check-lsan PROPERTIES FOLDER "LSan tests")
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



-- 
Alexey Samsonov
vonosmas at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150617/ce727fa5/attachment.html>


More information about the llvm-commits mailing list