Hi Jai,
Jai Menon <[email protected]> writes:
> Hello,
>
> I think these should be harmless enough.
>
> - Remove a bunch of trailing commas at the end of enumerated lists.
> Fixes compilation with -fpedantic (and is more valid c++ anyway)
>
> - Factor some harcoded python paths/flags into make variables. This
> allows users to override these when building in other
> "environments". The correct way, of course, is to have the buildsystem
> extract these from python-config, but I'm not sure if that'll need to
> be in llvm's configure script or in lldb.
I think using python-config from within the lldb makefiles should be OK
(perhaps one day LLDB will grow its own configure stage so we can
test for the existence of python-config).
Perhaps something like the below -- could you test on Darwin?
All the other patches look good to me.
diff --git a/Makefile b/Makefile
index 528c36c..9afcad2 100644
--- a/Makefile
+++ b/Makefile
@@ -33,10 +33,11 @@ CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/include
CPP.Flags += -I$(PROJ_OBJ_DIR)/$(LLDB_LEVEL)/include
CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/../clang/include
CPP.Flags += -I$(PROJ_OBJ_DIR)/$(LLDB_LEVEL)/../clang/include
-CPP.Flags += -I/usr/include/python2.6
CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/source
CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/source/Utility
CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/source/Plugins/Process/Utility
+CPP.Flags += $(shell python-config --includes)
+
ifeq ($(HOST_OS),Darwin)
CPP.Flags += -F/System/Library/Frameworks -F/System/Library/PrivateFrameworks
endif
diff --git a/lib/Makefile b/lib/Makefile
index fffcab6..3440663 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -84,8 +84,9 @@ ifeq ($(HOST_OS),Darwin)
LLVMLibsOptions += -avoid-version
LLVMLibsOptions += -F/System/Library/Frameworks
-F/System/Library/PrivateFrameworks
LLVMLibsOptions += -framework Foundation -framework CoreFoundation
- LLVMLibsOptions += -framework DebugSymbols -lpython2.6 -lobjc
+ LLVMLibsOptions += -framework DebugSymbols -lobjc
LLVMLibsOptions += -Wl,-exported_symbols_list
-Wl,"$(PROJ_SRC_DIR)/$(LLDB_LEVEL)/resources/lldb-framework-exports"
+ LLVMLibsOptions += $(shell python-config --ldflags)
# Mac OS X 10.4 and earlier tools do not allow a second -install_name on
command line
DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed
's/.*darwin\([0-9]*\).*/\1/')
ifneq ($(DARWIN_VERS),8)
@@ -101,5 +102,5 @@ ifeq ($(HOST_OS), Linux)
# Don't allow unresolved symbols.
LLVMLibsOptions += -Wl,--no-undefined
# Link in python
- LD.Flags += -lpython2.6
+ LD.Flags += $(shell python-config --ldflags)
endif
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev