[compiler-rt] r216264 - [ASan] Use check_library_exists to determine if libc/libstdc++ are available

Timur Iskhodzhanov timurrrr at google.com
Fri Aug 22 05:26:35 PDT 2014


Author: timurrrr
Date: Fri Aug 22 07:26:34 2014
New Revision: 216264

URL: http://llvm.org/viewvc/llvm-project?rev=216264&view=rev
Log:
[ASan] Use check_library_exists to determine if libc/libstdc++ are available

Modified:
    compiler-rt/trunk/cmake/config-ix.cmake
    compiler-rt/trunk/lib/asan/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=216264&r1=216263&r2=216264&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/config-ix.cmake Fri Aug 22 07:26:34 2014
@@ -45,9 +45,11 @@ check_cxx_compiler_flag(/wd4722 COMPILER
 check_symbol_exists(__func__ "" COMPILER_RT_HAS_FUNC_SYMBOL)
 
 # Libraries.
-check_library_exists(m pow "" COMPILER_RT_HAS_LIBM)
+check_library_exists(c printf "" COMPILER_RT_HAS_LIBC)
 check_library_exists(dl dlopen "" COMPILER_RT_HAS_LIBDL)
+check_library_exists(m pow "" COMPILER_RT_HAS_LIBM)
 check_library_exists(pthread pthread_create "" COMPILER_RT_HAS_LIBPTHREAD)
+check_library_exists(stdc++ __cxa_throw "" COMPILER_RT_HAS_LIBSTDCXX)
 
 # Architectures.
 

Modified: compiler-rt/trunk/lib/asan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/CMakeLists.txt?rev=216264&r1=216263&r2=216264&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/asan/CMakeLists.txt Fri Aug 22 07:26:34 2014
@@ -58,9 +58,11 @@ set(ASAN_DYNAMIC_CFLAGS ${ASAN_CFLAGS})
 append_if(COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC
   -ftls-model=initial-exec ASAN_DYNAMIC_CFLAGS)
 
-set(ASAN_DYNAMIC_LIBS stdc++ m c)
-append_if(COMPILER_RT_HAS_LIBPTHREAD pthread ASAN_DYNAMIC_LIBS)
+append_if(COMPILER_RT_HAS_LIBC c ASAN_DYNAMIC_LIBS)
 append_if(COMPILER_RT_HAS_LIBDL dl ASAN_DYNAMIC_LIBS)
+append_if(COMPILER_RT_HAS_LIBM m ASAN_DYNAMIC_LIBS)
+append_if(COMPILER_RT_HAS_LIBPTHREAD pthread ASAN_DYNAMIC_LIBS)
+append_if(COMPILER_RT_HAS_LIBSTDCXX stdc++ ASAN_DYNAMIC_LIBS)
 
 # Compile ASan sources into an object library.
 if(APPLE)





More information about the llvm-commits mailing list