Skip to content

Commit 261d52f

Browse files
committed
---
yaml --- r: 150782 b: refs/heads/try2 c: d0aed09 h: refs/heads/master v: v3
1 parent 0ddc621 commit 261d52f

File tree

784 files changed

+6835
-7818
lines changed

Some content is hidden

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

784 files changed

+6835
-7818
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: 5dd94d86c64eb13382b3230c9a22c1e59d1e361a
8+
refs/heads/try2: d0aed0995b6ca50ff0955ccda2e9d98076e9f961
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ documentation.
5959

6060
[repo]: https://github.com/mozilla/rust
6161
[tarball]: http://static.rust-lang.org/dist/rust-nightly.tar.gz
62-
[tutorial]: http://static.rust-lang.org/doc/master/tutorial.html
62+
[tutorial]: http://static.rust-lang.org/doc/nightly/tutorial.html
6363

6464
## Notes
6565

branches/try2/mk/crates.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@
4949
# automatically generated for all stage/host/target combinations.
5050
################################################################################
5151

52-
TARGET_CRATES := libc std green rustuv native flate arena glob term semver \
52+
TARGET_CRATES := std green rustuv native flate arena glob term semver \
5353
uuid serialize sync getopts collections num test time rand \
5454
workcache url log
5555
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat
5656
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5757
TOOLS := compiletest rustdoc rustc
5858

59-
DEPS_std := libc native:rustrt native:compiler-rt native:backtrace
59+
DEPS_std := native:rustrt native:compiler-rt native:backtrace
6060
DEPS_green := std rand native:context_switch
6161
DEPS_rustuv := std native:uv native:uv_support
6262
DEPS_native := std

branches/try2/mk/dist.mk

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

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
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
217219
$$(Q)(cd $$(PREPARE_DEST_DIR)/ && find . -type f | sed 's/^\.\///') \
218220
> tmp/dist/manifest-$(1).in
219221
$$(Q)mv tmp/dist/manifest-$(1).in $$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)/rustlib/manifest.in
@@ -225,16 +227,6 @@ dist-install-dir-$(1)$(3): prepare-base-dir-$(1) docs compiler-docs
225227
$$(Q)cp -r doc $$(PREPARE_DEST_DIR)
226228
$$(Q)$$(PREPARE_BIN_CMD) $$(S)src/etc/install.sh $$(PREPARE_DEST_DIR)
227229

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-
238230
dist/$$(PKG_NAME)-$(1).tar.gz: dist-install-dir-$(1)
239231
@$(call E, build: $$@)
240232
$$(Q)tar -czf dist/$$(PKG_NAME)-$(1).tar.gz -C tmp/dist $$(PKG_NAME)-$(1)

branches/try2/mk/docs.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ 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)
273272
doc/$(1)/index.html: $$(LIB_DOC_DEP_$(1))
274273
@$$(call E, rustdoc $$@)
275274
$$(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)-with-target-libs
17+
install: dist-install-dir-$(CFG_BUILD)
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)-with-target-libs
22+
uninstall: dist-install-dir-$(CFG_BUILD)
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: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -349,44 +349,25 @@ 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-
367352
# Pass --cfg stage0 only for the build->host part of stage0;
368353
# if you're building a cross config, the host->* parts are
369354
# 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.
378355
ifeq ($(1),0)
379356
ifneq ($(strip $(CFG_BUILD)),$(strip $(3)))
380357
CFGFLAG$(1)_T_$(2)_H_$(3) = stage1
358+
endif
359+
endif
381360

361+
ifdef CFG_DISABLE_RPATH
382362
ifeq ($$(OSTYPE_$(3)),apple-darwin)
383363
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
384-
DYLD_LIBRARY_PATH="$$$$DYLD_LIBRARY_PATH:$$(CURDIR)/$$(TLIB1_T_$(2)_H_$(CFG_BUILD))"
364+
DYLD_LIBRARY_PATH="$$$$DYLD_LIBRARY_PATH:$$(CURDIR)/$$(HLIB$(1)_H_$(3))"
385365
else
386366
RPATH_VAR$(1)_T_$(2)_H_$(3) := \
387-
LD_LIBRARY_PATH="$$$$LD_LIBRARY_PATH:$$(CURDIR)/$$(TLIB1_T_$(2)_H_$(CFG_BUILD))"
388-
endif
367+
LD_LIBRARY_PATH="$$$$LD_LIBRARY_PATH:$$(CURDIR)/$$(HLIB$(1)_H_$(3))"
389368
endif
369+
else
370+
RPATH_VAR$(1)_T_$(2)_H_$(3) :=
390371
endif
391372

392373
STAGE$(1)_T_$(2)_H_$(3) := \
@@ -413,11 +394,6 @@ $(foreach build,$(CFG_HOST), \
413394
$(eval $(foreach stage,$(STAGES), \
414395
$(eval $(call SREQ,$(stage),$(target),$(build))))))))
415396

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-
421397
######################################################################
422398
# rustc-H-targets
423399
#

branches/try2/mk/tests.mk

Lines changed: 69 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,6 @@ check-ref: cleantestlibs cleantmptestlogs check-stage2-rpass \
183183
check-docs: cleantestlibs cleantmptestlogs check-stage2-docs
184184
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
185185

186-
# NOTE: Remove after reprogramming windows bots
187-
check-fast: check-lite
188-
189186
.PHONY: cleantmptestlogs cleantestlibs
190187

191188
cleantmptestlogs:
@@ -373,6 +370,8 @@ $(foreach host,$(CFG_HOST), \
373370
define DEF_TEST_CRATE_RULES
374371
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
375372

373+
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
374+
376375
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
377376
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
378377
@$$(call E, run: $$<)
@@ -504,10 +503,6 @@ CTEST_BUILD_BASE_codegen = codegen
504503
CTEST_MODE_codegen = codegen
505504
CTEST_RUNTOOL_codegen = $(CTEST_RUNTOOL)
506505

507-
# CTEST_DISABLE_$(TEST_GROUP), if set, will cause the test group to be
508-
# disabled and the associated message to be printed as a warning
509-
# during attempts to run those tests.
510-
511506
ifeq ($(CFG_GDB),)
512507
CTEST_DISABLE_debuginfo = "no gdb found"
513508
endif
@@ -520,14 +515,6 @@ ifeq ($(CFG_OSTYPE),apple-darwin)
520515
CTEST_DISABLE_debuginfo = "gdb on darwing needs root"
521516
endif
522517

523-
# CTEST_DISABLE_NONSELFHOST_$(TEST_GROUP), if set, will cause that
524-
# test group to be disabled *unless* the target is able to build a
525-
# compiler (i.e. when the target triple is in the set of of host
526-
# triples). The associated message will be printed as a warning
527-
# during attempts to run those tests.
528-
529-
CTEST_DISABLE_NONSELFHOST_rpass-full = "run-pass-full suite is unavailable when cross-compiling."
530-
531518
define DEF_CTEST_VARS
532519

533520
# All the per-stage build rules you might want to call from the
@@ -573,7 +560,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
573560
$$(CTEST_TESTARGS)
574561

575562
CTEST_DEPS_rpass_$(1)-T-$(2)-H-$(3) = $$(RPASS_TESTS)
576-
CTEST_DEPS_rpass-full_$(1)-T-$(2)-H-$(3) = $$(RPASS_FULL_TESTS) $$(CSREQ$(1)_T_$(2)_H_$(3))
563+
CTEST_DEPS_rpass_full_$(1)-T-$(2)-H-$(3) = $$(RPASS_FULL_TESTS) $$(TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3))
577564
CTEST_DEPS_rfail_$(1)-T-$(2)-H-$(3) = $$(RFAIL_TESTS)
578565
CTEST_DEPS_cfail_$(1)-T-$(2)-H-$(3) = $$(CFAIL_TESTS)
579566
CTEST_DEPS_bench_$(1)-T-$(2)-H-$(3) = $$(BENCH_TESTS)
@@ -600,28 +587,8 @@ CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \
600587

601588
check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
602589

603-
# CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4)
604-
# Goal: leave this variable as empty string if we should run the test.
605-
# Otherwise, set it to the reason we are not running the test.
606-
# (Encoded as a separate variable because GNU make does not have a
607-
# good way to express OR on ifeq commands)
590+
ifeq ($$(CTEST_DISABLE_$(4)),)
608591

609-
ifneq ($$(CTEST_DISABLE_$(4)),)
610-
# Test suite is disabled for all configured targets.
611-
CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4) := $$(CTEST_DISABLE_$(4))
612-
else
613-
# else, check if non-self-hosted target (i.e. target not-in hosts) ...
614-
ifeq ($$(findstring $(2),$$(CFG_HOST)),)
615-
# ... if so, then check if this test suite is disabled for non-selfhosts.
616-
ifneq ($$(CTEST_DISABLE_NONSELFHOST_$(4)),)
617-
# Test suite is disabled for this target.
618-
CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4) := $$(CTEST_DISABLE_NONSELFHOST_$(4))
619-
endif
620-
endif
621-
# Neither DISABLE nor DISABLE_NONSELFHOST is set ==> okay, run the test.
622-
endif
623-
624-
ifeq ($$(CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4)),)
625592
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
626593
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
627594
$$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3))
@@ -633,9 +600,11 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
633600

634601
else
635602

636-
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)):
603+
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
604+
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
605+
$$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3))
637606
@$$(call E, run $(4) [$(2)]: $$<)
638-
@$$(call E, warning: tests disabled: $$(CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4)))
607+
@$$(call E, warning: tests disabled: $$(CTEST_DISABLE_$(4)))
639608
touch $$@
640609

641610
endif
@@ -878,9 +847,69 @@ $(foreach crate,$(TEST_CRATES), \
878847
$(eval $(call DEF_CHECK_CRATE,$(crate))))
879848

880849
######################################################################
881-
# RMAKE rules
850+
# check-fast rules
882851
######################################################################
883852

853+
FT := run_pass_stage2
854+
FT_LIB := $(call CFG_LIB_NAME_$(CFG_BUILD),$(FT))
855+
FT_DRIVER := $(FT)_driver
856+
857+
GENERATED += tmp/$(FT).rc tmp/$(FT_DRIVER).rs
858+
859+
tmp/$(FT).rc tmp/$(FT_DRIVER).rs: \
860+
$(RPASS_TESTS) \
861+
$(S)src/etc/combine-tests.py
862+
@$(call E, check: building combined stage2 test runner)
863+
$(Q)$(CFG_PYTHON) $(S)src/etc/combine-tests.py
864+
865+
define DEF_CHECK_FAST_FOR_T_H
866+
# $(1) unused
867+
# $(2) target triple
868+
# $(3) host triple
869+
870+
$$(TLIB2_T_$(2)_H_$(3))/$$(FT_LIB): \
871+
tmp/$$(FT).rc \
872+
$$(SREQ2_T_$(2)_H_$(3))
873+
@$$(call E, oxidize: $$@)
874+
$$(STAGE2_T_$(2)_H_$(3)) --crate-type=dylib --out-dir $$(@D) $$< \
875+
-L "$$(RT_OUTPUT_DIR_$(2))"
876+
877+
$(3)/test/$$(FT_DRIVER)-$(2)$$(X_$(2)): \
878+
tmp/$$(FT_DRIVER).rs \
879+
$$(TLIB2_T_$(2)_H_$(3))/$$(FT_LIB) \
880+
$$(SREQ2_T_$(2)_H_$(3))
881+
@$$(call E, oxidize: $$@ $$<)
882+
$$(STAGE2_T_$(2)_H_$(3)) -o $$@ $$< \
883+
-L "$$(RT_OUTPUT_DIR_$(2))"
884+
885+
$(3)/test/$$(FT_DRIVER)-$(2).out: \
886+
$(3)/test/$$(FT_DRIVER)-$(2)$$(X_$(2)) \
887+
$$(SREQ2_T_$(2)_H_$(3))
888+
$$(Q)$$(call CFG_RUN_TEST_$(2),$$<,$(2),$(3)) \
889+
--logfile tmp/$$(FT_DRIVER)-$(2).log
890+
891+
check-fast-T-$(2)-H-$(3): \
892+
$(3)/test/$$(FT_DRIVER)-$(2).out
893+
894+
endef
895+
896+
$(foreach host,$(CFG_HOST), \
897+
$(eval $(foreach target,$(CFG_TARGET), \
898+
$(eval $(call DEF_CHECK_FAST_FOR_T_H,,$(target),$(host))))))
899+
900+
check-fast: tidy check-fast-H-$(CFG_BUILD) \
901+
$(foreach crate,$(TARGET_CRATES),check-stage2-$(crate))
902+
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
903+
904+
define DEF_CHECK_FAST_FOR_H
905+
906+
check-fast-H-$(1): check-fast-T-$(1)-H-$(1)
907+
908+
endef
909+
910+
$(foreach host,$(CFG_HOST), \
911+
$(eval $(call DEF_CHECK_FAST_FOR_H,$(host))))
912+
884913
RMAKE_TESTS := $(shell ls -d $(S)src/test/run-make/*/)
885914
RMAKE_TESTS := $(RMAKE_TESTS:$(S)src/test/run-make/%/=%)
886915

@@ -904,7 +933,6 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
904933
@rm -rf $(3)/test/run-make/$$*
905934
@mkdir -p $(3)/test/run-make/$$*
906935
$$(Q)$$(CFG_PYTHON) $(S)src/etc/maketest.py $$(dir $$<) \
907-
$$(MAKE) \
908936
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
909937
$(3)/test/run-make/$$* \
910938
"$$(CC_$(3)) $$(CFG_GCCISH_CFLAGS_$(3))" \

branches/try2/src/compiletest/compiletest.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
#![crate_type = "bin"]
1212
#![feature(phase)]
1313

14-
// we use our own (green) start below; do not link in libnative; issue #13247.
15-
#![no_start]
16-
1714
#![allow(non_camel_case_types)]
1815
#![deny(warnings)]
1916

branches/try2/src/compiletest/procsrv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ pub fn run(lib_path: &str,
8484

8585
Some(Result {
8686
status: status,
87-
out: str::from_utf8(output.as_slice()).unwrap().to_owned(),
88-
err: str::from_utf8(error.as_slice()).unwrap().to_owned()
87+
out: str::from_utf8_owned(output).unwrap(),
88+
err: str::from_utf8_owned(error).unwrap()
8989
})
9090
},
9191
Err(..) => None

0 commit comments

Comments
 (0)