Skip to content

Commit 8ef498b

Browse files
committed
---
yaml --- r: 31170 b: refs/heads/dist-snap c: 6426f05 h: refs/heads/master v: v3
1 parent 9cc679f commit 8ef498b

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: 3c011aab74547a590a5efe3d93bb9e8bfcc0c252
10+
refs/heads/dist-snap: 6426f05b8ff0a1abe5400af4b82fe12629269e9b
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/mk/host.mk

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ $$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC): \
3131
@$$(call E, cp: $$@)
3232
$$(Q)cp $$< $$@
3333
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTC_GLOB) \
34+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTC_DSYM_GLOB) \
3435
$$(HLIB$(2)_H_$(4))
3536

3637
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBSYNTAX): \
@@ -42,6 +43,7 @@ $$(HLIB$(2)_H_$(4))/$$(CFG_LIBSYNTAX): \
4243
@$$(call E, cp: $$@)
4344
$$(Q)cp $$< $$@
4445
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBSYNTAX_GLOB) \
46+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBSYNTAX_DSYM_GLOB) \
4547
$$(HLIB$(2)_H_$(4))
4648

4749
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME): \
@@ -54,7 +56,15 @@ $$(HLIB$(2)_H_$(4))/$$(CFG_CORELIB): \
5456
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME)
5557
@$$(call E, cp: $$@)
5658
$$(Q)cp $$< $$@
59+
# Subtle: We do not let the shell expand $(CORELIB_DSYM_GLOB) directly rather
60+
# we use Make's $$(wildcard) facility. The reason is that, on mac, when using
61+
# USE_SNAPSHOT_CORELIB, we copy the core.dylib file out of the snapshot.
62+
# In that case, there is no .dSYM file. Annoyingly, bash then refuses to expand
63+
# glob, and cp reports an error because libcore-*.dylib.dsym does not exist.
64+
# Make instead expands the glob to nothing, which gives us the correct behavior.
65+
# (Copy .dsym file if it exists, but do nothing otherwise)
5766
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(CORELIB_GLOB) \
67+
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(CORELIB_DSYM_GLOB)) \
5868
$$(HLIB$(2)_H_$(4))
5969

6070
$$(HLIB$(2)_H_$(4))/$$(CFG_STDLIB): \
@@ -64,6 +74,7 @@ $$(HLIB$(2)_H_$(4))/$$(CFG_STDLIB): \
6474
@$$(call E, cp: $$@)
6575
$$(Q)cp $$< $$@
6676
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(STDLIB_GLOB) \
77+
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(STDLIB_DSYM_GLOB)) \
6778
$$(HLIB$(2)_H_$(4))
6879

6980
$$(HLIB$(2)_H_$(4))/libcore.rlib: \

branches/dist-snap/mk/platform.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ endif
7676

7777
ifneq ($(findstring darwin,$(CFG_OSTYPE)),)
7878
CFG_LIB_NAME=lib$(1).dylib
79-
# needs trailing * to pick up the .dSYM file too
80-
CFG_LIB_GLOB=lib$(1)-*.dylib*
79+
CFG_LIB_GLOB=lib$(1)-*.dylib
80+
CFG_LIB_DSYM_GLOB=lib$(1)-*.dylib.dSYM
8181
CFG_UNIXY := 1
8282
CFG_LDENV := DYLD_LIBRARY_PATH
8383
CFG_GCCISH_LINK_FLAGS += -dynamiclib -lpthread -framework CoreServices -Wl,-no_compact_unwind

0 commit comments

Comments
 (0)