Skip to content

Commit 0519128

Browse files
committed
---
yaml --- r: 108378 b: refs/heads/dist-snap c: 2b64cb2 h: refs/heads/master v: v3
1 parent eee8676 commit 0519128

File tree

4 files changed

+42
-30
lines changed

4 files changed

+42
-30
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 508cb29dc4358a625afaa83dce8a9853864999f2
9+
refs/heads/dist-snap: 2b64cb294c7ceae003694e663458025a79f11da4
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/mk/install.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
ISTAGE = 2
1717

1818
install: PREPARE_HOST=$(CFG_BUILD)
19-
install: PREPARE_TARGETS=$(CFG_BUILD)
19+
install: PREPARE_TARGETS=$(CFG_TARGET)
2020
install: PREPARE_STAGE=$(ISTAGE)
2121
install: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
2222
install: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
@@ -26,9 +26,9 @@ install: PREPARE_SOURCE_DIR=$(PREPARE_HOST)/stage$(PREPARE_STAGE)
2626
install: PREPARE_SOURCE_BIN_DIR=$(PREPARE_SOURCE_DIR)/bin
2727
install: PREPARE_SOURCE_LIB_DIR=$(PREPARE_SOURCE_DIR)/$(CFG_LIBDIR_RELATIVE)
2828
install: PREPARE_SOURCE_MAN_DIR=$(S)/man
29-
install: PREPARE_DEST_BIN_DIR=$(CFG_PREFIX)/bin
30-
install: PREPARE_DEST_LIB_DIR=$(CFG_LIBDIR)
31-
install: PREPARE_DEST_MAN_DIR=$(CFG_MANDIR)/man1
29+
install: PREPARE_DEST_BIN_DIR=$(DESTDIR)$(CFG_PREFIX)/bin
30+
install: PREPARE_DEST_LIB_DIR=$(DESTDIR)$(CFG_LIBDIR)
31+
install: PREPARE_DEST_MAN_DIR=$(DESTDIR)$(CFG_MANDIR)/man1
3232
install: prepare-everything
3333

3434

branches/dist-snap/mk/prepare.mk

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ DEFAULT_PREPARE_MAN_CMD = install -m755
4747
# Because of the way these rules are organized, preparing from any
4848
# stage requires all these stages to be built
4949
ifdef CFG_WINDOWSY_$(CFG_BUILD)
50-
PREPARE_STAGES=1 2 3
50+
PREPARE_STAGES=3
5151
else
52-
PREPARE_STAGES=1 2
52+
PREPARE_STAGES=2
5353
endif
5454

5555
# Create a directory
@@ -98,25 +98,26 @@ endef
9898

9999
PREPARE_TOOLS = $(filter-out compiletest, $(TOOLS))
100100

101-
prepare-host: prepare-host-dirs prepare-host-tools
101+
prepare-host: prepare-host-tools
102102

103-
prepare-host-dirs:
104-
$(call PREPARE_DIR,$(PREPARE_DEST_BIN_DIR))
105-
$(call PREPARE_DIR,$(PREPARE_DEST_LIB_DIR))
106-
$(call PREPARE_DIR,$(PREPARE_DEST_MAN_DIR))
107-
108-
prepare-host-tools:\
103+
prepare-host-tools: \
109104
$(foreach tool, $(PREPARE_TOOLS),\
110105
$(foreach stage,$(PREPARE_STAGES),\
111106
$(foreach host,$(CFG_HOST),\
112107
prepare-host-tool-$(tool)-$(stage)-$(host))))
113108

109+
prepare-host-dirs:
110+
$(call PREPARE_DIR,$(PREPARE_DEST_BIN_DIR))
111+
$(call PREPARE_DIR,$(PREPARE_DEST_LIB_DIR))
112+
$(call PREPARE_DIR,$(PREPARE_DEST_MAN_DIR))
113+
114114
# $(1) is tool
115115
# $(2) is stage
116116
# $(3) is host
117117
define DEF_PREPARE_HOST_TOOL
118118
prepare-host-tool-$(1)-$(2)-$(3): $$(foreach dep,$$(TOOL_DEPS_$(1)),prepare-host-lib-$$(dep)-$(2)-$(3)) \
119-
$$(HBIN$(2)_H_$(3))/$(1)$$(X_$(3))
119+
$$(HBIN$(2)_H_$(3))/$(1)$$(X_$(3)) \
120+
prepare-host-dirs
120121
$$(if $$(findstring $(2), $$(PREPARE_STAGE)),\
121122
$$(if $$(findstring $(3), $$(PREPARE_HOST)),\
122123
$$(call PREPARE_BIN,$(1)$$(X_$$(PREPARE_HOST))),),)
@@ -130,14 +131,18 @@ $(foreach tool,$(PREPARE_TOOLS),\
130131
$(foreach host,$(CFG_HOST),\
131132
$(eval $(call DEF_PREPARE_HOST_TOOL,$(tool),$(stage),$(host))))))
132133

134+
# For host libraries only install dylibs, not rlibs since the host libs are only
135+
# used to support rustc and rustc uses dynamic linking
136+
#
133137
# $(1) is tool
134138
# $(2) is stage
135139
# $(3) is host
136140
define DEF_PREPARE_HOST_LIB
137141
prepare-host-lib-$(1)-$(2)-$(3): PREPARE_WORKING_SOURCE_LIB_DIR=$$(PREPARE_SOURCE_LIB_DIR)
138142
prepare-host-lib-$(1)-$(2)-$(3): PREPARE_WORKING_DEST_LIB_DIR=$$(PREPARE_DEST_LIB_DIR)
139143
prepare-host-lib-$(1)-$(2)-$(3): $$(foreach dep,$$(RUST_DEPS_$(1)),prepare-host-lib-$$(dep)-$(2)-$(3))\
140-
$$(HLIB$(2)_H_$(3))/stamp.$(1)
144+
$$(HLIB$(2)_H_$(3))/stamp.$(1) \
145+
prepare-host-dirs
141146
$$(if $$(findstring $(2), $$(PREPARE_STAGE)),\
142147
$$(if $$(findstring $(3), $$(PREPARE_HOST)),\
143148
$$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$$(PREPARE_HOST),$(1))),),)
@@ -154,30 +159,36 @@ prepare-targets:\
154159
$(foreach stage,$(PREPARE_STAGES),\
155160
prepare-target-$(target)-host-$(host)-$(stage))))
156161

157-
# $(1) is target
158-
# $(2) is host
159-
# $(3) is stage
162+
# $(1) is stage
163+
# $(2) is target
164+
# $(3) is host
160165
define DEF_PREPARE_TARGET_N
161166
# Rebind PREPARE_*_LIB_DIR to point to rustlib, then install the libs for the targets
162-
prepare-target-$(1)-host-$(2)-$(3): PREPARE_WORKING_SOURCE_LIB_DIR=$$(PREPARE_SOURCE_LIB_DIR)/rustlib/$(1)/lib
163-
prepare-target-$(1)-host-$(2)-$(3): PREPARE_WORKING_DEST_LIB_DIR=$$(PREPARE_DEST_LIB_DIR)/rustlib/$(1)/lib
164-
prepare-target-$(1)-host-$(2)-$(3): \
167+
prepare-target-$(2)-host-$(3)-$(1): PREPARE_WORKING_SOURCE_LIB_DIR=$$(PREPARE_SOURCE_LIB_DIR)/$$(CFG_RUSTLIBDIR)/$(2)/lib
168+
prepare-target-$(2)-host-$(3)-$(1): PREPARE_WORKING_DEST_LIB_DIR=$$(PREPARE_DEST_LIB_DIR)/$$(CFG_RUSTLIBDIR)/$(2)/lib
169+
prepare-target-$(2)-host-$(3)-$(1): \
165170
$$(foreach crate,$$(TARGET_CRATES), \
166-
$$(TLIB$(3)_T_$(1)_H_$(2))/stamp.$$(crate))
171+
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(crate)) \
172+
$$(if $$(findstring $(2),$$(CFG_HOST)), \
173+
$$(foreach crate,$$(HOST_CRATES), \
174+
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(crate)),)
167175
# Only install if this host and target combo is being prepared
168-
$$(if $$(findstring $(2), $$(PREPARE_HOST)),\
169-
$$(if $$(findstring $(1), $$(PREPARE_TARGETS)),\
170-
$$(if $$(findstring $(3), $$(PREPARE_STAGE)),\
176+
$$(if $$(findstring $(1), $$(PREPARE_STAGE)),\
177+
$$(if $$(findstring $(2), $$(PREPARE_TARGETS)),\
178+
$$(if $$(findstring $(3), $$(PREPARE_HOST)),\
171179
$$(call PREPARE_DIR,$$(PREPARE_WORKING_DEST_LIB_DIR))\
172180
$$(foreach crate,$$(TARGET_CRATES),\
173-
$$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(1),$$(crate))))\
174-
$$(foreach crate,$$(TARGET_CRATES),\
181+
$$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(2),$$(crate)))\
175182
$$(call PREPARE_LIB,$$(call CFG_RLIB_GLOB,$$(crate))))\
176-
$$(call PREPARE_LIB,libmorestack.a)
183+
$$(if $$(findstring $(2),$$(CFG_HOST)),\
184+
$$(foreach crate,$$(HOST_CRATES),\
185+
$$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(2),$$(crate)))\
186+
$$(call PREPARE_LIB,$$(call CFG_RLIB_GLOB,$$(crate)))),)\
187+
$$(call PREPARE_LIB,libmorestack.a) \
177188
$$(call PREPARE_LIB,libcompiler-rt.a),),),)
178189
endef
179190

180191
$(foreach host,$(CFG_HOST),\
181192
$(foreach target,$(CFG_TARGET), \
182193
$(foreach stage,$(PREPARE_STAGES),\
183-
$(eval $(call DEF_PREPARE_TARGET_N,$(target),$(host),$(stage))))))
194+
$(eval $(call DEF_PREPARE_TARGET_N,$(stage),$(target),$(host))))))

branches/dist-snap/src/librustdoc/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#[desc = "rustdoc, the Rust documentation extractor"];
1313
#[license = "MIT/ASL2"];
1414
#[crate_type = "dylib"];
15+
#[crate_type = "rlib"];
1516

1617
#[feature(globs, struct_variant, managed_boxes)];
1718

0 commit comments

Comments
 (0)