diff options
author | Tamas Berghammer <tberghammer@google.com> | 2015-02-25 13:02:08 +0000 |
---|---|---|
committer | Tamas Berghammer <tberghammer@google.com> | 2015-02-25 13:02:08 +0000 |
commit | 37099e87cb7808c725398c08c1a9977d51f1721f (patch) | |
tree | d500dc79202511f109ea10b2e3093f3d28e52f72 /lldb | |
parent | 6723ecb552bde1bf6dfbd031736525bac898d9d2 (diff) | |
download | llvm-37099e87cb7808c725398c08c1a9977d51f1721f.zip llvm-37099e87cb7808c725398c08c1a9977d51f1721f.tar.gz llvm-37099e87cb7808c725398c08c1a9977d51f1721f.tar.bz2 |
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
llvm-svn: 230487
Diffstat (limited to 'lldb')
-rw-r--r-- | lldb/test/make/Makefile.rules | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lldb/test/make/Makefile.rules b/lldb/test/make/Makefile.rules index 0d5d5a1..0bdb2d6 100644 --- a/lldb/test/make/Makefile.rules +++ b/lldb/test/make/Makefile.rules @@ -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)) |