[lldb-dev] [PATCH] Compiling lldb on Linux
Eli Friedman
eli.friedman at gmail.com
Fri Jul 2 12:50:56 PDT 2010
Attached are two patches which (along with recent commits) allow
compiling lldb on Linux; the generated executable even works to the
point where it can disassemble named functions from an x86-32 ELF
file. The build procedure is essentially just check out lldb into
llvm/tools/ in an LLVM tree with a built LLVM and clang, apply this
patch, and run make in the lldb directory. Note that the makefiles
depend on a Python 2.6 install, and the presence of libedit, which
isn't normally installed on Linux (but libedit-dev is available in
Ubuntu).
The Makefiles aren't quite complete; they're missing steps to generate
some files. The second patch is required because of this. Any help
with that and reviews would be welcome.
-Eli
-------------- next part --------------
Index: include/lldb/Makefile
===================================================================
--- include/lldb/Makefile (revision 0)
+++ include/lldb/Makefile (revision 0)
@@ -0,0 +1,31 @@
+LEVEL = ../../../..
+DIRS :=
+
+include $(LEVEL)/Makefile.common
+
+install-local::
+ $(Echo) Installing Clang include files
+ $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_includedir)
+ $(Verb) if test -d "$(PROJ_SRC_ROOT)/tools/clang/include/clang" ; then \
+ cd $(PROJ_SRC_ROOT)/tools/clang/include && \
+ for hdr in `find clang -type f '!' '(' -name '*~' \
+ -o -name '.#*' -o -name '*.in' -o -name '*.txt' \
+ -o -name 'Makefile' -o -name '*.td' -o -name '*.orig' ')' -print \
+ | grep -v CVS | grep -v .svn | grep -v .dir` ; do \
+ instdir=$(DESTDIR)`dirname "$(PROJ_includedir)/$$hdr"` ; \
+ if test \! -d "$$instdir" ; then \
+ $(EchoCmd) Making install directory $$instdir ; \
+ $(MKDIR) $$instdir ;\
+ fi ; \
+ $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
+ done ; \
+ fi
+ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
+ $(Verb) if test -d "$(PROJ_OBJ_ROOT)/tools/clang/include/clang" ; then \
+ cd $(PROJ_OBJ_ROOT)/tools/clang/include && \
+ for hdr in `find clang -type f '!' '(' -name 'Makefile' ')' -print \
+ | grep -v CVS | grep -v .tmp | grep -v .dir` ; do \
+ $(DataInstall) $$hdr $(DESTDIR)$(PROJ_includedir)/$$hdr ; \
+ done ; \
+ fi
+endif
Index: include/Makefile
===================================================================
--- include/Makefile (revision 0)
+++ include/Makefile (revision 0)
@@ -0,0 +1,13 @@
+##===- include/Makefile ------------------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ..
+DIRS := lldb
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/SymbolVendor/MacOSX/Makefile
===================================================================
--- source/Plugins/SymbolVendor/MacOSX/Makefile (revision 0)
+++ source/Plugins/SymbolVendor/MacOSX/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/SymbolVendor/MacOSX/Makefile ---------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginSymbolVendorMacOSX
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/SymbolFile/Symtab/Makefile
===================================================================
--- source/Plugins/SymbolFile/Symtab/Makefile (revision 0)
+++ source/Plugins/SymbolFile/Symtab/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/SymbolFile/Symtab/Makefile -----------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginSymbolFileSymtab
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/SymbolFile/DWARF/Makefile
===================================================================
--- source/Plugins/SymbolFile/DWARF/Makefile (revision 0)
+++ source/Plugins/SymbolFile/DWARF/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/SymbolFile/DWARF/Makefile ------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginSymbolFileDWARF
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/ObjectFile/ELF/Makefile
===================================================================
--- source/Plugins/ObjectFile/ELF/Makefile (revision 0)
+++ source/Plugins/ObjectFile/ELF/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/ObjectFile/ELF/Makefile --------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginObjectFileELF
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/ObjectContainer/BSD-Archive/Makefile
===================================================================
--- source/Plugins/ObjectContainer/BSD-Archive/Makefile (revision 0)
+++ source/Plugins/ObjectContainer/BSD-Archive/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/ObjectContainer/BSD-Archive/Makefile -------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginObjectContainerBSDArchive
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/ObjectContainer/Universal-Mach-O/Makefile
===================================================================
--- source/Plugins/ObjectContainer/Universal-Mach-O/Makefile (revision 0)
+++ source/Plugins/ObjectContainer/Universal-Mach-O/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/ObjectContainer/Universal-Mach-O/Makefile -------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginObjectContainerUniversalMachO
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/ABI/SysV-x86_64/Makefile
===================================================================
--- source/Plugins/ABI/SysV-x86_64/Makefile (revision 0)
+++ source/Plugins/ABI/SysV-x86_64/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/ABI/SysV-x86_64/Makefile -------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginABISysV_x86_64
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/ABI/MacOSX-i386/Makefile
===================================================================
--- source/Plugins/ABI/MacOSX-i386/Makefile (revision 0)
+++ source/Plugins/ABI/MacOSX-i386/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/ABI/MacOSX-i386/Makefile -------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginABIMacOSX_i386
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/Disassembler/llvm/Makefile
===================================================================
--- source/Plugins/Disassembler/llvm/Makefile (revision 0)
+++ source/Plugins/Disassembler/llvm/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/Disassembler/llvm/Makefile -------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginDisassemblerLLVM
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/Makefile
===================================================================
--- source/Plugins/Makefile (revision 0)
+++ source/Plugins/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/Makefile -----------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+# DynamicLoader/MacOSX-DYLD ObjectContainer/Universal-Mach-O ObjectFile/Mach-O Process/gdb-remote Process/MacOSX-User Process/Utility
+DIRS := ABI/MacOSX-i386 ABI/SysV-x86_64 Disassembler/llvm ObjectContainer/BSD-Archive ObjectFile/ELF SymbolFile/DWARF SymbolFile/Symtab SymbolVendor/MacOSX
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Plugins/Process/gdb-remote/Makefile
===================================================================
--- source/Plugins/Process/gdb-remote/Makefile (revision 0)
+++ source/Plugins/Process/gdb-remote/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Plugins/Process/gdb-remote/Makefile -------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../../..
+LIBRARYNAME := lldbPluginProcessGDBRemote
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Target/Makefile
===================================================================
--- source/Target/Makefile (revision 0)
+++ source/Target/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Target/Makefile ------------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+LIBRARYNAME := lldbTarget
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Core/Makefile
===================================================================
--- source/Core/Makefile (revision 0)
+++ source/Core/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Core/Makefile --------------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+LIBRARYNAME := lldbCore
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Breakpoint/Makefile
===================================================================
--- source/Breakpoint/Makefile (revision 0)
+++ source/Breakpoint/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Breakpoint/Makefile --------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+LIBRARYNAME := lldbBreakpoint
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Expression/Makefile
===================================================================
--- source/Expression/Makefile (revision 0)
+++ source/Expression/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Expression/Makefile --------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+LIBRARYNAME := lldbExpression
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Commands/Makefile
===================================================================
--- source/Commands/Makefile (revision 0)
+++ source/Commands/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Commands/Makefile ----------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+LIBRARYNAME := lldbCommands
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Interpreter/Makefile
===================================================================
--- source/Interpreter/Makefile (revision 0)
+++ source/Interpreter/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Interpreter/Makefile ------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+LIBRARYNAME := lldbInterpreter
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Utility/Makefile
===================================================================
--- source/Utility/Makefile (revision 0)
+++ source/Utility/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Utility/Makefile -----------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+LIBRARYNAME := lldbUtility
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Symbol/Makefile
===================================================================
--- source/Symbol/Makefile (revision 0)
+++ source/Symbol/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Symbol/Makefile ------------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+LIBRARYNAME := lldbSymbol
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/API/Makefile
===================================================================
--- source/API/Makefile (revision 0)
+++ source/API/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/API/Makefile ---------------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+LIBRARYNAME := lldbAPI
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Host/linux/Makefile
===================================================================
--- source/Host/linux/Makefile (revision 0)
+++ source/Host/linux/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Host/linux/Makefile --------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../..
+LIBRARYNAME := lldbHostLinux
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Host/posix/Makefile
===================================================================
--- source/Host/posix/Makefile (revision 0)
+++ source/Host/posix/Makefile (revision 0)
@@ -0,0 +1,14 @@
+##===- source/Host/posix/Makefile --------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../../..
+LIBRARYNAME := lldbHostPosix
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Host/Makefile
===================================================================
--- source/Host/Makefile (revision 0)
+++ source/Host/Makefile (revision 0)
@@ -0,0 +1,13 @@
+##===- source/Host/Makefile --------------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ../..
+DIRS := linux posix
+
+include $(LLDB_LEVEL)/Makefile
Index: source/Makefile
===================================================================
--- source/Makefile (revision 0)
+++ source/Makefile (revision 0)
@@ -0,0 +1,15 @@
+##===- source/Makefile -------------------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ..
+DIRS := API Breakpoint Commands Core Expression Host Interpreter Plugins Symbol Target Utility
+LIBRARYNAME := lldbInitAndLog
+BUILD_ARCHIVE = 1
+
+include $(LLDB_LEVEL)/Makefile
Index: tools/driver/Makefile
===================================================================
--- tools/driver/Makefile (revision 0)
+++ tools/driver/Makefile (revision 0)
@@ -0,0 +1,34 @@
+##===- tools/driver/Makefile -------------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+LLDB_LEVEL := ../..
+
+TOOLNAME = lldb
+
+LD.Flags += -ledit -lpython2.6
+
+# Include this here so we can get the configuration of the targets that have
+# been configured for construction. We have to do this early so we can set up
+# LINK_COMPONENTS before including Makefile.rules
+include $(LLDB_LEVEL)/../../Makefile.config
+
+LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \
+ ipo selectiondag jit
+
+USEDLIBS = lldbAPI.a lldbInitAndLog.a lldbPluginDisassemblerLLVM.a \
+ lldbPluginObjectFileELF.a lldbPluginObjectContainerBSDArchive.a \
+ lldbPluginSymbolFileDWARF.a lldbPluginSymbolFileSymtab.a \
+ lldbPluginSymbolVendorMacOSX.a
+USEDLIBS += lldbTarget.a lldbInterpreter.a lldbCommands.a lldbBreakpoint.a \
+ lldbCore.a lldbSymbol.a lldbExpression.a lldbUtility.a
+USEDLIBS += lldbHostLinux.a lldbHostPosix.a
+USEDLIBS += clangFrontend.a clangDriver.a clangCodeGen.a clangSema.a \
+ clangChecker.a clangAnalysis.a clangRewrite.a clangAST.a \
+ clangParse.a clangLex.a clangBasic.a
+USEDLIBS += EnhancedDisassembly.a
+include $(LLDB_LEVEL)/Makefile
Index: tools/Makefile
===================================================================
--- tools/Makefile (revision 0)
+++ tools/Makefile (revision 0)
@@ -0,0 +1,13 @@
+##===- source/Makefile -------------------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LLDB_LEVEL := ..
+DIRS := driver
+
+include $(LLDB_LEVEL)/Makefile
Index: Makefile
===================================================================
--- Makefile (revision 0)
+++ Makefile (revision 0)
@@ -0,0 +1,83 @@
+##===- Makefile --------------------------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+# If LLDB_LEVEL is not set, then we are the top-level Makefile. Otherwise, we
+# are being included from a subdirectory makefile.
+
+ifndef LLDB_LEVEL
+
+IS_TOP_LEVEL := 1
+LLDB_LEVEL := .
+DIRS := include source tools
+
+PARALLEL_DIRS :=
+endif
+
+###
+# Common Makefile code, shared by all LLDB Makefiles.
+
+# Set LLVM source root level.
+LEVEL := $(LLDB_LEVEL)/../..
+
+# Include LLVM common makefile.
+include $(LEVEL)/Makefile.common
+
+# Set common LLDB build flags.
+CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/include -I$(PROJ_OBJ_DIR)/$(LLDB_LEVEL)/include
+CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/../clang/include
+CPP.Flags += -I/usr/include/python2.6
+ifdef LLDB_VENDOR
+CPP.Flags += -DLLDB_VENDOR='"$(LLDB_VENDOR) "'
+endif
+
+# Disable -fstrict-aliasing. Darwin disables it by default (and LLVM doesn't
+# work with it enabled with GCC), Clang/llvm-gc don't support it yet, and newer
+# GCC's have false positive warnings with it on Linux (which prove a pain to
+# fix). For example:
+# http://gcc.gnu.org/PR41874
+# http://gcc.gnu.org/PR41838
+#
+# We can revisit this when LLVM/Clang support it.
+CXX.Flags += -fno-strict-aliasing
+
+###
+# LLDB Top Level specific stuff.
+
+ifeq ($(IS_TOP_LEVEL),1)
+
+ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
+$(RecursiveTargets)::
+ $(Verb) if [ ! -f test/Makefile ]; then \
+ $(MKDIR) test; \
+ $(CP) $(PROJ_SRC_DIR)/test/Makefile test/Makefile; \
+ fi
+endif
+
+test::
+ @ $(MAKE) -C test
+
+report::
+ @ $(MAKE) -C test report
+
+clean::
+ @ $(MAKE) -C test clean
+
+tags::
+ $(Verb) etags `find . -type f -name '*.h' -or -name '*.cpp' | \
+ grep -v /lib/Headers | grep -v /test/`
+
+cscope.files:
+ find tools lib include -name '*.cpp' \
+ -or -name '*.def' \
+ -or -name '*.td' \
+ -or -name '*.h' > cscope.files
+
+.PHONY: test report clean cscope.files
+
+endif
-------------- next part --------------
Index: source/lldb.cpp
===================================================================
--- source/lldb.cpp (revision 107498)
+++ source/lldb.cpp (working copy)
@@ -100,10 +100,10 @@
const char *
lldb_private::GetVersion ()
{
- extern const double LLDBVersionNumber;
+ //extern const double LLDBVersionNumber;
static char g_version_string[32];
if (g_version_string[0] == '\0')
- ::snprintf (g_version_string, sizeof(g_version_string), "LLDB-%g", LLDBVersionNumber);
+ ::snprintf (g_version_string, sizeof(g_version_string), "LLDB-%g", 0.0/*LLDBVersionNumber*/);
return g_version_string;
}
Index: source/Interpreter/ScriptInterpreterPython.cpp
===================================================================
--- source/Interpreter/ScriptInterpreterPython.cpp (revision 107498)
+++ source/Interpreter/ScriptInterpreterPython.cpp (working copy)
@@ -151,7 +151,7 @@
// Find the module that owns this code and use that path we get to
// set the PYTHONPATH appropriately.
- FileSpec this_module (Host::GetModuleFileSpecForHostAddress ((void *)init_lldb));
+ FileSpec this_module;// (Host::GetModuleFileSpecForHostAddress ((void *)init_lldb));
std::string python_path;
if (this_module.GetDirectory())
@@ -183,7 +183,7 @@
m_compiled_module = static_cast<void*>(compiled_module);
- init_lldb ();
+ //init_lldb ();
// Update the path python uses to search for modules to include the current directory.
More information about the lldb-dev
mailing list