[Lldb-commits] [lldb] r217414 - Fix configure & make build with python disabled
Keno Fischer
kfischer at college.harvard.edu
Mon Sep 8 21:52:37 PDT 2014
Author: kfischer
Date: Mon Sep 8 23:52:37 2014
New Revision: 217414
URL: http://llvm.org/viewvc/llvm-project?rev=217414&view=rev
Log:
Fix configure & make build with python disabled
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.
Differential Revision: http://reviews.llvm.org/D4918
Modified:
lldb/trunk/scripts/Makefile
lldb/trunk/source/Host/freebsd/Makefile
lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm
lldb/trunk/source/Host/posix/HostInfoPosix.cpp
lldb/trunk/source/Interpreter/Makefile
lldb/trunk/source/Plugins/Process/FreeBSD/Makefile
lldb/trunk/source/Plugins/Process/Linux/Makefile
lldb/trunk/source/Plugins/Process/POSIX/Makefile
Modified: lldb/trunk/scripts/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Makefile?rev=217414&r1=217413&r2=217414&view=diff
==============================================================================
--- lldb/trunk/scripts/Makefile (original)
+++ lldb/trunk/scripts/Makefile Mon Sep 8 23:52:37 2014
@@ -10,6 +10,8 @@
LLDB_LEVEL := ..
include $(LLDB_LEVEL)/../../Makefile.config
+ifeq (,$(findstring -DLLDB_DISABLE_PYTHON,$(CXXFLAGS)))
DIRS := Python
+endif
include $(LLDB_LEVEL)/Makefile
Modified: lldb/trunk/source/Host/freebsd/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/freebsd/Makefile?rev=217414&r1=217413&r2=217414&view=diff
==============================================================================
--- lldb/trunk/source/Host/freebsd/Makefile (original)
+++ lldb/trunk/source/Host/freebsd/Makefile Mon Sep 8 23:52:37 2014
@@ -11,6 +11,6 @@ LLDB_LEVEL := ../../..
LIBRARYNAME := lldbHostFreeBSD
BUILD_ARCHIVE = 1
-CPPFLAGS += -I/usr/local/include
+CPP.Flags += -I/usr/local/include
include $(LLDB_LEVEL)/Makefile
Modified: lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm?rev=217414&r1=217413&r2=217414&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm (original)
+++ lldb/trunk/source/Host/macosx/HostInfoMacOSX.mm Mon Sep 8 23:52:37 2014
@@ -176,6 +176,7 @@ HostInfoMacOSX::ComputeHeaderDirectory(F
bool
HostInfoMacOSX::ComputePythonDirectory(FileSpec &file_spec)
{
+#ifndef LLDB_DISABLE_PYTHON
FileSpec lldb_file_spec;
if (!GetLLDBPath(lldb::ePathTypeLLDBShlibDir, lldb_file_spec))
return false;
@@ -200,7 +201,9 @@ HostInfoMacOSX::ComputePythonDirectory(F
::strncat(raw_path, python_version_dir.c_str(), sizeof(raw_path) - strlen(raw_path) - 1);
}
file_spec.GetDirectory().SetCString(raw_path);
- return true;
+#else
+ return false;
+#endif
}
bool
Modified: lldb/trunk/source/Host/posix/HostInfoPosix.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/HostInfoPosix.cpp?rev=217414&r1=217413&r2=217414&view=diff
==============================================================================
--- lldb/trunk/source/Host/posix/HostInfoPosix.cpp (original)
+++ lldb/trunk/source/Host/posix/HostInfoPosix.cpp Mon Sep 8 23:52:37 2014
@@ -173,6 +173,7 @@ HostInfoPosix::ComputeHeaderDirectory(Fi
bool
HostInfoPosix::ComputePythonDirectory(FileSpec &file_spec)
{
+#ifndef LLDB_DISABLE_PYTHON
FileSpec lldb_file_spec;
if (!GetLLDBPath(lldb::ePathTypeLLDBShlibDir, lldb_file_spec))
return false;
@@ -190,4 +191,7 @@ HostInfoPosix::ComputePythonDirectory(Fi
file_spec.GetDirectory().SetCString(raw_path);
return true;
+#else
+ return false;
+#endif
}
Modified: lldb/trunk/source/Interpreter/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Makefile?rev=217414&r1=217413&r2=217414&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/Makefile (original)
+++ lldb/trunk/source/Interpreter/Makefile Mon Sep 8 23:52:37 2014
@@ -13,12 +13,16 @@ BUILD_ARCHIVE = 1
include $(LLDB_LEVEL)/../../Makefile.config
ifneq ($(HOST_OS),MingW)
+ifeq (,$(findstring -DLLDB_DISABLE_PYTHON,$(CXXFLAGS)))
+DO_BUILD_LLDBWrapPython = 1
BUILT_SOURCES := LLDBWrapPython.cpp
endif
+endif
include $(LLDB_LEVEL)/Makefile
-include $(PROJ_OBJ_DIR)/LLDBWrapPython.cpp.d
+ifeq ($(DO_BUILD_LLDBWrapPython),1)
# Drop -Wfour-char-constants, which we are not currently clean with.
EXTRA_OPTIONS += -Wno-four-char-constants
@@ -41,3 +45,4 @@ install-local:: lldb.py
clean-local::
$(Verb) $(RM) -f LLDBWrapPython.cpp lldb.py
+endif
Modified: lldb/trunk/source/Plugins/Process/FreeBSD/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/Makefile?rev=217414&r1=217413&r2=217414&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/Makefile (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/Makefile Mon Sep 8 23:52:37 2014
@@ -12,6 +12,6 @@ LIBRARYNAME := lldbPluginProcessFreeBSD
BUILD_ARCHIVE = 1
# 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
include $(LLDB_LEVEL)/Makefile
Modified: lldb/trunk/source/Plugins/Process/Linux/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/Makefile?rev=217414&r1=217413&r2=217414&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/Makefile (original)
+++ lldb/trunk/source/Plugins/Process/Linux/Makefile Mon Sep 8 23:52:37 2014
@@ -12,6 +12,6 @@ LIBRARYNAME := lldbPluginProcessLinux
BUILD_ARCHIVE = 1
# 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
include $(LLDB_LEVEL)/Makefile
Modified: lldb/trunk/source/Plugins/Process/POSIX/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/Makefile?rev=217414&r1=217413&r2=217414&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/Makefile (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/Makefile Mon Sep 8 23:52:37 2014
@@ -14,19 +14,19 @@ BUILD_ARCHIVE = 1
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
More information about the lldb-commits
mailing list