diff options
author | Todd Fiala <tfiala@google.com> | 2013-10-14 09:48:59 -0700 |
---|---|---|
committer | Todd Fiala <tfiala@google.com> | 2013-11-05 16:01:15 -0800 |
commit | d55c5b19487ef22383a32548f1143f1dfac2478f (patch) | |
tree | bb5bf929961945f47d6e3e86d7f83cf349021e8d /lldb-build.mk | |
parent | 670e8f81114cc9ab17e16a60561b75856698b586 (diff) | |
download | lldb-d55c5b19487ef22383a32548f1143f1dfac2478f.tar.gz |
Add Android.mk support for building LLDB on Linux host.
This change adds support for building LLDB with the following
build command from the top level:
make FORCE_BUILD_LLVM_COMPONENTS=true ANDROID_BUILD_LLDB=true lldb
There are known issues with the google linux host gcc 4.6.2+ variant
currently used to build host executables. A follow up change will
apply a temporary work-around that will be used until either the
compiler is fixed or a new compiler is used.
Change-Id: I18451f73cbe2264074cd8fba6397680855352a93
Diffstat (limited to 'lldb-build.mk')
-rw-r--r-- | lldb-build.mk | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/lldb-build.mk b/lldb-build.mk new file mode 100644 index 000000000..558b0a838 --- /dev/null +++ b/lldb-build.mk @@ -0,0 +1,47 @@ +# clang populates much of what we need +LOCAL_CFLAGS := \ + -fvisibility-inlines-hidden \ + -Wno-missing-field-initializers \ + -Wno-sequence-point \ + -Wno-sign-compare \ + -Wno-uninitialized \ + -Wno-unused-function \ + -Wno-unused-variable \ + $(LOCAL_CFLAGS) + +# TODO change this when clang or gcc > 2.6 support is added +CPLUSPLUS_STANDARD := -std=c++0x + +LOCAL_CPPFLAGS := \ + $(CPLUSPLUS_STANDARD) \ + $(LOCAL_CPPFLAGS) + +PYTHON_BASE_PATH := prebuilts/python/linux-x86/2.7.5 +PYTHON_INCLUDE_PATH := $(PYTHON_BASE_PATH)/include/python2.7 + +LOCAL_C_INCLUDES := \ + $(PYTHON_INCLUDE_PATH) \ + $(LLDB_ROOT_PATH)/include \ + $(LLDB_ROOT_PATH)/source \ + $(LLDB_ROOT_PATH)/source/Utility \ + $(LLDB_ROOT_PATH)/source/Plugins/Process/Utility \ + $(LLDB_ROOT_PATH)/source/Plugins/Process/POSIX \ + $(LOCAL_C_INCLUDES) + +LLVM_ROOT_PATH := external/llvm +include $(LLVM_ROOT_PATH)/llvm.mk + +CLANG_ROOT_PATH := external/clang +include $(CLANG_ROOT_PATH)/clang.mk + +ifneq ($(LLVM_HOST_BUILD_MK),) +include $(LLVM_HOST_BUILD_MK) +endif + +ifneq ($(CLANG_HOST_BUILD_MK),) +include $(CLANG_HOST_BUILD_MK) +endif + +# strip out flags from clang/llvm that we know we don't handle +LOCAL_CFLAGS := $(subst -pedantic,,$(LOCAL_CFLAGS)) +LOCAL_CPPFLAGS := $(subst -pedantic,,$(LOCAL_CPPFLAGS)) |