Skip to content

Commit

Permalink
update promotion rules to not fail when .dsym file does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Mar 22, 2012
1 parent b653a18 commit ea60308
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mk/host.mk
Expand Up @@ -45,8 +45,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) \
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CORELIB_DSYM_GLOB) \
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(CORELIB_DSYM_GLOB)) \
$$(HLIB$(2)_H_$(4))

$$(HLIB$(2)_H_$(4))/$$(CFG_STDLIB): \
Expand Down

0 comments on commit ea60308

Please sign in to comment.