[Lldb-commits] [PATCH] Fix build on Linux with DISABLE_PYTHON enabled

Keno Fischer kfischer at college.harvard.edu
Thu Aug 14 16:21:18 PDT 2014


This makes sure that nothing that requires Python is being built when the LLDB_DISABLE_PYTHON flag is being passed in. It also changes a use of CPPFLAGS to CPP.Flags since the former is overridden when external flags are passed in while the later is not. I'm not sure exactly why LLDB_DISABLE_PYTHON is in CXXFLAGS rather than CPPFLAGS, but cleaning that up is for another commit.

http://reviews.llvm.org/D4918

Files:
  scripts/Makefile
  source/Interpreter/Makefile
  source/Plugins/Process/POSIX/Makefile

Index: scripts/Makefile
===================================================================
--- scripts/Makefile
+++ scripts/Makefile
@@ -10,6 +10,8 @@
 LLDB_LEVEL := ..
 include $(LLDB_LEVEL)/../../Makefile.config
 
+ifeq (,$(findstring -DLLDB_DISABLE_PYTHON,$(CXXFLAGS)))
 DIRS := Python
+endif
 
 include $(LLDB_LEVEL)/Makefile
Index: source/Interpreter/Makefile
===================================================================
--- source/Interpreter/Makefile
+++ source/Interpreter/Makefile
@@ -13,12 +13,16 @@
 include $(LLDB_LEVEL)/../../Makefile.config
 
 ifneq ($(HOST_OS),MingW)
+ifeq (,$(findstring -DLLDB_DISABLE_PYTHON,$(CXXFLAGS)))
+DO_BUILD = 1
 BUILT_SOURCES := LLDBWrapPython.cpp
 endif
+endif
 
 include $(LLDB_LEVEL)/Makefile
 -include $(PROJ_OBJ_DIR)/LLDBWrapPython.cpp.d
 
+ifeq ($(DO_BUILD),1)
 # Drop -Wfour-char-constants,  which we are not currently clean with.
 EXTRA_OPTIONS += -Wno-four-char-constants
 
@@ -40,3 +44,4 @@
 
 clean-local::
 	$(Verb) $(RM) -f LLDBWrapPython.cpp lldb.py
+endif
Index: source/Plugins/Process/POSIX/Makefile
===================================================================
--- source/Plugins/Process/POSIX/Makefile
+++ source/Plugins/Process/POSIX/Makefile
@@ -14,19 +14,19 @@
 include $(LLDB_LEVEL)/../../Makefile.config
 
 # Extend the include path so we may locate UnwindLLDB.h
-CPPFLAGS += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/source/Plugins/Utility
+CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/source/Plugins/Utility
 
 ifeq ($(HOST_OS),Linux)
-CPPFLAGS += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/source/Plugins/Process/Linux
+CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/source/Plugins/Process/Linux
 
 # Disable warning for now as offsetof is used with an index into a structure member array
 # in defining register info tables.
-CPPFLAGS += -Wno-extended-offsetof
+CPP.Flags += -Wno-extended-offsetof
 endif
 
 ifneq (,$(filter $(HOST_OS), FreeBSD GNU/kFreeBSD))
 # Extend the include path so we may locate ProcessMonitor
-CPPFLAGS += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/source/Plugins/Process/FreeBSD
+CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/source/Plugins/Process/FreeBSD
 endif
 
 include $(LLDB_LEVEL)/Makefile
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4918.12529.patch
Type: text/x-patch
Size: 2174 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140814/46ed42ee/attachment.bin>


More information about the lldb-commits mailing list