Skip to content

Commit 73cfe8d

Browse files
committed
---
yaml --- r: 150809 b: refs/heads/try2 c: 74bd233 h: refs/heads/master i: 150807: f1f187f v: v3
1 parent 766077c commit 73cfe8d

File tree

801 files changed

+7742
-5813
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

801 files changed

+7742
-5813
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 0cc257eb42c72d26a151623825ecc6a8074c53cf
8+
refs/heads/try2: 74bd2338eb25d0d165458a09d7aab3d2ecb98c48
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/dist.mk

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -203,19 +203,17 @@ distcheck-osx: dist-osx
203203
# Unix binary installer tarballs
204204
######################################################################
205205

206-
define DEF_INSTALLER
207-
208-
$$(eval $$(call DEF_PREPARE,dir-$(1)))
209-
210-
dist-install-dir-$(1): PREPARE_HOST=$(1)
211-
dist-install-dir-$(1): PREPARE_TARGETS=$(1)
212-
dist-install-dir-$(1): PREPARE_DEST_DIR=tmp/dist/$$(PKG_NAME)-$(1)
213-
dist-install-dir-$(1): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
214-
dist-install-dir-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
215-
dist-install-dir-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
216-
dist-install-dir-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
217-
dist-install-dir-$(1): PREPARE_CLEAN=true
218-
dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
206+
define DEF_PREPARE_DIST_DIR
207+
208+
dist-install-dir-$(1)$(3): PREPARE_HOST=$(1)
209+
dist-install-dir-$(1)$(3): PREPARE_TARGETS=$(2)
210+
dist-install-dir-$(1)$(3): PREPARE_DEST_DIR=tmp/dist/$$(PKG_NAME)-$(1)
211+
dist-install-dir-$(1)$(3): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
212+
dist-install-dir-$(1)$(3): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
213+
dist-install-dir-$(1)$(3): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
214+
dist-install-dir-$(1)$(3): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
215+
dist-install-dir-$(1)$(3): PREPARE_CLEAN=true
216+
dist-install-dir-$(1)$(3): prepare-base-dir-$(1) docs compiler-docs
219217
$$(Q)(cd $$(PREPARE_DEST_DIR)/ && find . -type f | sed 's/^\.\///') \
220218
> tmp/dist/manifest-$(1).in
221219
$$(Q)mv tmp/dist/manifest-$(1).in $$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)/rustlib/manifest.in
@@ -227,6 +225,16 @@ dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
227225
$$(Q)cp -r doc $$(PREPARE_DEST_DIR)
228226
$$(Q)$$(PREPARE_BIN_CMD) $$(S)src/etc/install.sh $$(PREPARE_DEST_DIR)
229227

228+
endef
229+
230+
define DEF_INSTALLER
231+
232+
$$(eval $$(call DEF_PREPARE,dir-$(1)))
233+
234+
$$(eval $$(call DEF_PREPARE_DIST_DIR,$(1),$(1),))
235+
236+
$$(eval $$(call DEF_PREPARE_DIST_DIR,$(1),$(CFG_TARGET),-with-target-libs))
237+
230238
dist/$$(PKG_NAME)-$(1).tar.gz: dist-install-dir-$(1)
231239
@$(call E, build: $$@)
232240
$$(Q)tar -czf dist/$$(PKG_NAME)-$(1).tar.gz -C tmp/dist $$(PKG_NAME)-$(1)

branches/try2/mk/docs.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# L10N_LANGS are the languages for which the docs have been
2727
# translated.
2828
######################################################################
29-
DOCS := index tutorial guide-ffi guide-macros guide-lifetimes \
29+
DOCS := index intro tutorial guide-ffi guide-macros guide-lifetimes \
3030
guide-tasks guide-container guide-pointers guide-testing \
3131
guide-runtime complement-bugreport complement-cheatsheet \
3232
complement-lang-faq complement-project-faq rust rustdoc \
@@ -269,6 +269,7 @@ LIB_DOC_DEP_$(1) = $$(CRATEFILE_$(1)) $$(RSINPUTS_$(1))
269269
endif
270270

271271
$(2) += doc/$(1)/index.html
272+
doc/$(1)/index.html: CFG_COMPILER_HOST_TRIPLE = $(CFG_TARGET)
272273
doc/$(1)/index.html: $$(LIB_DOC_DEP_$(1))
273274
@$$(call E, rustdoc $$@)
274275
$$(Q)$$(RUSTDOC) --cfg dox --cfg stage2 $$<

branches/try2/mk/install.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ else
1414
MAYBE_DISABLE_VERIFY=
1515
endif
1616

17-
install: dist-install-dir-$(CFG_BUILD)
17+
install: dist-install-dir-$(CFG_BUILD)-with-target-libs
1818
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)" "$(MAYBE_DISABLE_VERIFY)"
1919
# Remove tmp files while we can because they may have been created under sudo
2020
$(Q)rm -R tmp/dist
2121

22-
uninstall: dist-install-dir-$(CFG_BUILD)
22+
uninstall: dist-install-dir-$(CFG_BUILD)-with-target-libs
2323
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)"
2424
# Remove tmp files while we can because they may have been created under sudo
2525
$(Q)rm -R tmp/dist

branches/try2/mk/main.mk

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -349,25 +349,44 @@ EXTRAFLAGS_STAGE$(1) = $$(RUSTFLAGS_STAGE$(1))
349349

350350
CFGFLAG$(1)_T_$(2)_H_$(3) = stage$(1)
351351

352+
endef
353+
354+
# Same macro/variables as above, but defined in a separate loop so it can use
355+
# all the varibles above for all archs. The RPATH_VAR setup sometimes needs to
356+
# reach across triples to get things in order.
357+
define SREQ_CMDS
358+
359+
ifeq ($$(OSTYPE_$(3)),apple-darwin)
360+
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
361+
DYLD_LIBRARY_PATH="$$$$DYLD_LIBRARY_PATH:$$(CURDIR)/$$(HLIB$(1)_H_$(3))"
362+
else
363+
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
364+
LD_LIBRARY_PATH="$$$$LD_LIBRARY_PATH:$$(CURDIR)/$$(HLIB$(1)_H_$(3))"
365+
endif
366+
352367
# Pass --cfg stage0 only for the build->host part of stage0;
353368
# if you're building a cross config, the host->* parts are
354369
# effectively stage1, since it uses the just-built stage0.
370+
#
371+
# This logic is similar to how the LD_LIBRARY_PATH variable must
372+
# change be slightly different when doing cross compilations.
373+
# The build doesn't copy over all target libraries into
374+
# a new directory, so we need to point the library path at
375+
# the build directory where all the target libraries came
376+
# from (the stage0 build host). Otherwise the relative rpaths
377+
# inside of the rustc binary won't get resolved correctly.
355378
ifeq ($(1),0)
356379
ifneq ($(strip $(CFG_BUILD)),$(strip $(3)))
357380
CFGFLAG$(1)_T_$(2)_H_$(3) = stage1
358-
endif
359-
endif
360381

361-
ifdef CFG_DISABLE_RPATH
362382
ifeq ($$(OSTYPE_$(3)),apple-darwin)
363383
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
364-
DYLD_LIBRARY_PATH="$$$$DYLD_LIBRARY_PATH:$$(CURDIR)/$$(HLIB$(1)_H_$(3))"
384+
DYLD_LIBRARY_PATH="$$$$DYLD_LIBRARY_PATH:$$(CURDIR)/$$(TLIB1_T_$(2)_H_$(CFG_BUILD))"
365385
else
366386
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
367-
LD_LIBRARY_PATH="$$$$LD_LIBRARY_PATH:$$(CURDIR)/$$(HLIB$(1)_H_$(3))"
387+
LD_LIBRARY_PATH="$$$$LD_LIBRARY_PATH:$$(CURDIR)/$$(TLIB1_T_$(2)_H_$(CFG_BUILD))"
388+
endif
368389
endif
369-
else
370-
RPATH_VAR$(1)_T_$(2)_H_$(3) :=
371390
endif
372391

373392
STAGE$(1)_T_$(2)_H_$(3) := \
@@ -394,6 +413,11 @@ $(foreach build,$(CFG_HOST), \
394413
$(eval $(foreach stage,$(STAGES), \
395414
$(eval $(call SREQ,$(stage),$(target),$(build))))))))
396415

416+
$(foreach build,$(CFG_HOST), \
417+
$(eval $(foreach target,$(CFG_TARGET), \
418+
$(eval $(foreach stage,$(STAGES), \
419+
$(eval $(call SREQ_CMDS,$(stage),$(target),$(build))))))))
420+
397421
######################################################################
398422
# rustc-H-targets
399423
#

branches/try2/src/compiletest/runtest.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ use std::io::timer;
3131
use std::io;
3232
use std::os;
3333
use std::str;
34+
use std::strbuf::StrBuf;
3435
use std::task;
3536
use std::slice;
3637
use test::MetricMap;
@@ -328,10 +329,10 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
328329
}
329330

330331
let args = split_maybe_args(&config.target_rustcflags);
331-
let mut tool_path:~str = ~"";
332+
let mut tool_path = StrBuf::new();
332333
for arg in args.iter() {
333334
if arg.contains("android-cross-path=") {
334-
tool_path = arg.replace("android-cross-path=","");
335+
tool_path = StrBuf::from_str(arg.replace("android-cross-path=", ""));
335336
break;
336337
}
337338
}
@@ -348,7 +349,7 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
348349
let gdb_path = tool_path.append("/bin/arm-linux-androideabi-gdb");
349350
let procsrv::Result{ out, err, status }=
350351
procsrv::run("",
351-
gdb_path,
352+
gdb_path.as_slice(),
352353
debugger_opts.as_slice(),
353354
vec!((~"",~"")),
354355
None)
@@ -451,7 +452,7 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
451452
let options_to_remove = [~"-O", ~"-g", ~"--debuginfo"];
452453
let new_options = split_maybe_args(options).move_iter()
453454
.filter(|x| !options_to_remove.contains(x))
454-
.collect::<~[~str]>()
455+
.collect::<Vec<~str>>()
455456
.connect(" ");
456457
Some(new_options)
457458
}

branches/try2/src/doc/complement-cheatsheet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ struct Foo {
152152
}
153153
154154
struct FooClosure<'a> {
155-
myfunc: 'a |int, uint| -> i32
155+
myfunc: |int, uint|: 'a -> i32
156156
}
157157
158158
fn a(a: int, b: uint) -> i32 {

0 commit comments

Comments
 (0)