[Lldb-commits] [lldb] r230487 - Fix global makefiles for the tests to support android

Tamas Berghammer tberghammer at google.com
Wed Feb 25 05:02:08 PST 2015


Author: tberghammer
Date: Wed Feb 25 07:02:08 2015
New Revision: 230487

URL: http://llvm.org/viewvc/llvm-project?rev=230487&view=rev
Log:
Fix global makefiles for the tests to support android

Two changes are required to compile the tests for android
* Disable the usage of -lpthread as it is included by default on
  android
* Add -pie to the linker flags because android only support position
  independent executables

Differential revision: http://reviews.llvm.org/D7856

Modified:
    lldb/trunk/test/make/Makefile.rules

Modified: lldb/trunk/test/make/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/make/Makefile.rules?rev=230487&r1=230486&r2=230487&view=diff
==============================================================================
--- lldb/trunk/test/make/Makefile.rules (original)
+++ lldb/trunk/test/make/Makefile.rules Wed Feb 25 07:02:08 2015
@@ -123,10 +123,10 @@ CXXFLAGS += $(CFLAGS)
 LD = $(CC)
 LDFLAGS ?= $(CFLAGS)
 LDFLAGS += $(LD_EXTRAS)
-ifneq "$(OS)" "Windows_NT"
+ifeq (,$(filter $(OS), Windows_NT Android))
     ifeq "$(ENABLE_THREADS)" "YES"
         LDFLAGS += -lpthread
-    else 
+    else
         ifeq "$(ENABLE_STD_THREADS)" "YES"
             # with the specific combination of Linux, g++, std=c++11, adding the 
             # linker flag -lpthread, will cause a program to hang when a std::conditional_variable
@@ -193,6 +193,13 @@ ifeq "$(OS)" "Windows_NT"
 endif
 
 #----------------------------------------------------------------------
+# Android specific options
+#----------------------------------------------------------------------
+ifeq "$(OS)" "Android"
+	LDFLAGS += -pie
+endif
+
+#----------------------------------------------------------------------
 # C++ standard library options
 #----------------------------------------------------------------------
 ifeq (1,$(USE_LIBSTDCPP))





More information about the lldb-commits mailing list