From 81a4d9066d0a54425710c6d6f9f8c6e3a3d6670d Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Fri, 13 Jul 2012 12:41:26 -0700 Subject: [PATCH 1/3] Revert "Try less complicated trick for solving the dSYM glob portability issue." This reverts commit 86dfca278dd5f9f589cecfe6de91ad8264c300d0. --- mk/host.mk | 11 +++++++++++ mk/platform.mk | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/mk/host.mk b/mk/host.mk index 3c35e4beb040c..c71e48f6f1205 100644 --- a/mk/host.mk +++ b/mk/host.mk @@ -31,6 +31,7 @@ $$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC): \ @$$(call E, cp: $$@) $$(Q)cp $$< $$@ $$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTC_GLOB) \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTC_DSYM_GLOB) \ $$(HLIB$(2)_H_$(4)) $$(HLIB$(2)_H_$(4))/$$(CFG_LIBSYNTAX): \ @@ -42,6 +43,7 @@ $$(HLIB$(2)_H_$(4))/$$(CFG_LIBSYNTAX): \ @$$(call E, cp: $$@) $$(Q)cp $$< $$@ $$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBSYNTAX_GLOB) \ + $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBSYNTAX_DSYM_GLOB) \ $$(HLIB$(2)_H_$(4)) $$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME): \ @@ -54,7 +56,15 @@ $$(HLIB$(2)_H_$(4))/$$(CFG_CORELIB): \ $$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME) @$$(call E, cp: $$@) $$(Q)cp $$< $$@ +# Subtle: We do not let the shell expand $(CORELIB_DSYM_GLOB) directly rather +# we use Make's $$(wildcard) facility. The reason is that, on mac, when using +# USE_SNAPSHOT_CORELIB, we copy the core.dylib file out of the snapshot. +# In that case, there is no .dSYM file. Annoyingly, bash then refuses to expand +# glob, and cp reports an error because libcore-*.dylib.dsym does not exist. +# Make instead expands the glob to nothing, which gives us the correct behavior. +# (Copy .dsym file if it exists, but do nothing otherwise) $$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(CORELIB_GLOB) \ + $$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(CORELIB_DSYM_GLOB)) \ $$(HLIB$(2)_H_$(4)) $$(HLIB$(2)_H_$(4))/$$(CFG_STDLIB): \ @@ -64,6 +74,7 @@ $$(HLIB$(2)_H_$(4))/$$(CFG_STDLIB): \ @$$(call E, cp: $$@) $$(Q)cp $$< $$@ $$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(STDLIB_GLOB) \ + $$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(STDLIB_DSYM_GLOB)) \ $$(HLIB$(2)_H_$(4)) $$(HLIB$(2)_H_$(4))/libcore.rlib: \ diff --git a/mk/platform.mk b/mk/platform.mk index ec3c5174b56bc..43a943347a573 100644 --- a/mk/platform.mk +++ b/mk/platform.mk @@ -76,8 +76,8 @@ endif ifneq ($(findstring darwin,$(CFG_OSTYPE)),) CFG_LIB_NAME=lib$(1).dylib - # needs trailing * to pick up the .dSYM file too - CFG_LIB_GLOB=lib$(1)-*.dylib* + CFG_LIB_GLOB=lib$(1)-*.dylib + CFG_LIB_DSYM_GLOB=lib$(1)-*.dylib.dSYM CFG_UNIXY := 1 CFG_LDENV := DYLD_LIBRARY_PATH CFG_GCCISH_LINK_FLAGS += -dynamiclib -lpthread -framework CoreServices -Wl,-no_compact_unwind From 830be1ff877540830507e58742d9bca3ecee0a08 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Fri, 13 Jul 2012 12:47:29 -0700 Subject: [PATCH 2/3] Even simpler attempt at solving the .dSYM mess. --- mk/host.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mk/host.mk b/mk/host.mk index c71e48f6f1205..dbb8333a5601b 100644 --- a/mk/host.mk +++ b/mk/host.mk @@ -31,7 +31,7 @@ $$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC): \ @$$(call E, cp: $$@) $$(Q)cp $$< $$@ $$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTC_GLOB) \ - $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTC_DSYM_GLOB) \ + $(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTC_DSYM_GLOB)) \ $$(HLIB$(2)_H_$(4)) $$(HLIB$(2)_H_$(4))/$$(CFG_LIBSYNTAX): \ @@ -43,7 +43,7 @@ $$(HLIB$(2)_H_$(4))/$$(CFG_LIBSYNTAX): \ @$$(call E, cp: $$@) $$(Q)cp $$< $$@ $$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBSYNTAX_GLOB) \ - $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBSYNTAX_DSYM_GLOB) \ + $$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBSYNTAX_DSYM_GLOB)) \ $$(HLIB$(2)_H_$(4)) $$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME): \ From 33a055638c637d2f63d1d7a18b235c93c08d10b8 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Fri, 20 Jul 2012 18:57:40 -0700 Subject: [PATCH 3/3] Release 0.3.1 --- Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 3a762f1c00ffc..d7724b4802ec0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -129,7 +129,7 @@ LIBSYNTAX_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,syntax) # version-string calculation CFG_GIT_DIR := $(CFG_SRC_DIR).git -CFG_RELEASE = 0.3 +CFG_RELEASE = 0.3.1 CFG_VERSION = $(CFG_RELEASE) ifneq ($(wildcard $(CFG_GIT)),)