Update to D11825.
authorChaoren Lin <chaorenl@google.com>
Fri, 7 Aug 2015 18:54:02 +0000 (18:54 +0000)
committerChaoren Lin <chaorenl@google.com>
Fri, 7 Aug 2015 18:54:02 +0000 (18:54 +0000)
Summary:
Adding `-latomic` to `ANDROID_LINKER_FLAGS` doesn't actually work.
Adding `atomic` to `LLDB_SYSTEM_LIBS` does.

Related: D11831.

Reviewers: Andrzej, ovyalov

Subscribers: tberghammer, danalbert, srhines, lldb-commits

Differential Revision: http://reviews.llvm.org/D11840

llvm-svn: 244343

lldb/cmake/platforms/Android.cmake

index af93051..bf3a632 100644 (file)
@@ -109,7 +109,11 @@ elseif( ANDROID_ABI STREQUAL "armeabi" )
  endif()
 elseif( ANDROID_ABI STREQUAL "mips" )
  # http://b.android.com/182094
- set( ANDROID_LINKER_FLAGS "${ANDROID_LINKER_FLAGS} -latomic" )
+ list( FIND LLDB_SYSTEM_LIBS atomic index )
+ if( index EQUAL -1 )
+  list( APPEND LLDB_SYSTEM_LIBS atomic )
+  set( LLDB_SYSTEM_LIBS ${LLDB_SYSTEM_LIBS} CACHE INTERNAL "" FORCE )
+ endif()
 endif()
 
 if( NOT LLVM_BUILD_STATIC )