Skip to content

Commit

Permalink
Patch lldb-3.7.1 to build on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
ihnorton committed Jan 8, 2016
1 parent 9464e6f commit c63fabb
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
6 changes: 6 additions & 0 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,12 @@ else ifeq ($(LLVM_VER),3.7.1)
$(eval $(call LLVM_PATCH,llvm-3.7.1))
endif # LLVM_VER

ifeq ($(LLVM_VER),3.7.1)
ifeq ($(BUILD_LLDB),1)
$(eval $(call LLVM_PATCH,lldb-3.7.1))
endif
endif

LLVM_BUILDDIR_withtype := $(LLVM_BUILD_DIR)/build_$(LLVM_BUILDTYPE)
ifneq ($(LLVM_USE_CMAKE),)

Expand Down
41 changes: 41 additions & 0 deletions deps/lldb-3.7.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
diff --git a/tools/lldb/source/Host/Makefile b/tools/lldb/source/Host/Makefile
index a8e4260..da90c8c 100644
--- a/tools/lldb/source/Host/Makefile
+++ b/tools/lldb/source/Host/Makefile
@@ -14,7 +14,7 @@ include $(LEVEL)/Makefile.config

define DIR_SOURCES
SOURCES += $$(addprefix $(1)/,$$(notdir $$(wildcard $$(PROJ_SRC_DIR)/$(1)/*.cpp \
- $$(PROJ_SRC_DIR)/*.cc $$(PROJ_SRC_DIR)/$(1)/*.c)))
+ $$(PROJ_SRC_DIR)/*.cc $$(PROJ_SRC_DIR)/$(1)/*.c $$(PROJ_SRC_DIR)/$(1)/*.mm)))
endef

$(eval $(call DIR_SOURCES,common))
@@ -22,6 +22,15 @@ $(eval $(call DIR_SOURCES,common))
ifeq ($(HOST_OS),Darwin)
$(eval $(call DIR_SOURCES,posix))
$(eval $(call DIR_SOURCES,macosx))
+CFCPP_SOURCES = \
+ $(addprefix macosx/cfcpp/,$(notdir $(wildcard $(PROJ_SRC_DIR)/macosx/cfcpp/*.cpp)))
+SOURCES += $(CFCPP_SOURCES)
+
+CFCPP_BaseNameSources := $(sort $(basename $(CFCPP_SOURCES)))
+CFCPP_OBJECTS := $(CFCPP_BaseNameSources:%=$(ObjDir)/%.o)
+
+# Make sure the cfcpp output directory exists
+$(CFCPP_OBJECTS): $(ObjDir)/cfcpp/.dir
endif

ifeq ($(HOST_OS),Linux)
@@ -34,6 +43,11 @@ $(eval $(call DIR_SOURCES,posix))
$(eval $(call DIR_SOURCES,freebsd))
endif

+ifeq ($(HOST_OS),NetBSD)
+$(eval $(call DIR_SOURCES,posix))
+$(eval $(call DIR_SOURCES,netbsd))
+endif
+
ifeq ($(HOST_OS),MingW)
$(eval $(call DIR_SOURCES,windows))
endif

0 comments on commit c63fabb

Please sign in to comment.