Skip to content

Commit f0e8bed

Browse files
committed
---
yaml --- r: 105033 b: refs/heads/snap-stage3 c: e233a43 h: refs/heads/master i: 105031: 27294e8 v: v3
1 parent c1e9458 commit f0e8bed

Some content is hidden

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

78 files changed

+1879
-1040
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 62f1d68439dcfd509eaca29887afa97f22938373
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 8da5ed2026acbe655e7fac53c95623bf37e45a97
4+
refs/heads/snap-stage3: e233a43f5a0e14ceb322b955b16c8967adb2f4a8
55
refs/heads/try: db814977d07bd798feb24f6b74c00800ef458a13
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/mk/dist.mk

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ $(PKG_EXE): rust.iss modpath.iss LICENSE.txt rust-logo.ico \
6565
dist-prepare-win: PREPARE_HOST=$(CFG_BUILD)
6666
dist-prepare-win: PREPARE_TARGETS=$(CFG_BUILD)
6767
dist-prepare-win: PREPARE_DEST_DIR=tmp/dist/win
68-
# On windows we're using stage3, unlike Unix...
69-
dist-prepare-win: PREPARE_STAGE=3
7068
dist-prepare-win: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
7169
dist-prepare-win: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
7270
dist-prepare-win: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
@@ -135,7 +133,6 @@ ifeq ($(CFG_OSTYPE), apple-darwin)
135133
dist-prepare-osx: PREPARE_HOST=$(CFG_BUILD)
136134
dist-prepare-osx: PREPARE_TARGETS=$(CFG_BUILD)
137135
dist-prepare-osx: PREPARE_DEST_DIR=tmp/dist/pkgroot
138-
dist-prepare-osx: PREPARE_STAGE=2
139136
dist-prepare-osx: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
140137
dist-prepare-osx: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
141138
dist-prepare-osx: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
@@ -165,7 +162,6 @@ dist-tar-bins: $(foreach host,$(CFG_HOST),dist/$(PKG_DIR)-$(host).tar.gz)
165162
define DEF_INSTALLER
166163
dist-install-dir-$(1): PREPARE_HOST=$(1)
167164
dist-install-dir-$(1): PREPARE_TARGETS=$(1)
168-
dist-install-dir-$(1): PREPARE_STAGE=2
169165
dist-install-dir-$(1): PREPARE_DEST_DIR=tmp/dist/$$(PKG_DIR)-$(1)
170166
dist-install-dir-$(1): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
171167
dist-install-dir-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)

branches/snap-stage3/mk/install.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@
1313
# mirror of the installation directory structure.
1414

1515
# The stage we install from
16-
ISTAGE = 2
16+
ISTAGE = $(PREPARE_STAGE)
1717

1818
install: PREPARE_HOST=$(CFG_BUILD)
1919
install: PREPARE_TARGETS=$(CFG_TARGET)
20-
install: PREPARE_STAGE=$(ISTAGE)
2120
install: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
2221
install: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
2322
install: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)

branches/snap-stage3/mk/prepare.mk

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@
2020
# PREPARE_TARGETS - the target triples, space separated
2121
# PREPARE_DEST_DIR - the directory to put the image
2222

23-
prepare: PREPARE_STAGE=2
23+
24+
# On windows we install from stage3, but on unix only stage2
25+
ifdef CFG_WINDOWSY_$(CFG_BUILD)
26+
PREPARE_STAGE=3
27+
else
28+
PREPARE_STAGE=2
29+
endif
30+
2431
prepare: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
2532
prepare: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
2633
prepare: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
@@ -43,15 +50,6 @@ DEFAULT_PREPARE_BIN_CMD = install -m755
4350
DEFAULT_PREPARE_LIB_CMD = install -m644
4451
DEFAULT_PREPARE_MAN_CMD = install -m644
4552

46-
# On windows we install from stage3, but on unix only stage2
47-
# Because of the way these rules are organized, preparing from any
48-
# stage requires all these stages to be built
49-
ifdef CFG_WINDOWSY_$(CFG_BUILD)
50-
PREPARE_STAGES=3
51-
else
52-
PREPARE_STAGES=2
53-
endif
54-
5553
# Create a directory
5654
# $(1) is the directory
5755
define PREPARE_DIR
@@ -102,9 +100,8 @@ prepare-host: prepare-host-tools
102100

103101
prepare-host-tools: \
104102
$(foreach tool, $(PREPARE_TOOLS),\
105-
$(foreach stage,$(PREPARE_STAGES),\
106-
$(foreach host,$(CFG_HOST),\
107-
prepare-host-tool-$(tool)-$(stage)-$(host))))
103+
$(foreach host,$(CFG_HOST),\
104+
prepare-host-tool-$(tool)-$(PREPARE_STAGE)-$(host)))
108105

109106
prepare-host-dirs: prepare-maybe-clean
110107
$(call PREPARE_DIR,$(PREPARE_DEST_BIN_DIR))
@@ -128,9 +125,8 @@ prepare-host-tool-$(1)-$(2)-$(3): prepare-maybe-clean \
128125
endef
129126

130127
$(foreach tool,$(PREPARE_TOOLS),\
131-
$(foreach stage,$(PREPARE_STAGES),\
132-
$(foreach host,$(CFG_HOST),\
133-
$(eval $(call DEF_PREPARE_HOST_TOOL,$(tool),$(stage),$(host))))))
128+
$(foreach host,$(CFG_HOST),\
129+
$(eval $(call DEF_PREPARE_HOST_TOOL,$(tool),$(PREPARE_STAGE),$(host)))))
134130

135131
# For host libraries only install dylibs, not rlibs since the host libs are only
136132
# used to support rustc and rustc uses dynamic linking
@@ -151,15 +147,13 @@ prepare-host-lib-$(1)-$(2)-$(3): prepare-maybe-clean \
151147
endef
152148

153149
$(foreach lib,$(CRATES),\
154-
$(foreach stage,$(PREPARE_STAGES),\
155-
$(foreach host,$(CFG_HOST),\
156-
$(eval $(call DEF_PREPARE_HOST_LIB,$(lib),$(stage),$(host))))))
150+
$(foreach host,$(CFG_HOST),\
151+
$(eval $(call DEF_PREPARE_HOST_LIB,$(lib),$(PREPARE_STAGE),$(host)))))
157152

158153
prepare-targets:\
159154
$(foreach host,$(CFG_HOST),\
160155
$(foreach target,$(CFG_TARGET),\
161-
$(foreach stage,$(PREPARE_STAGES),\
162-
prepare-target-$(target)-host-$(host)-$(stage))))
156+
prepare-target-$(target)-host-$(host)-$(PREPARE_STAGE)))
163157

164158
# $(1) is stage
165159
# $(2) is target
@@ -194,8 +188,7 @@ endef
194188

195189
$(foreach host,$(CFG_HOST),\
196190
$(foreach target,$(CFG_TARGET), \
197-
$(foreach stage,$(PREPARE_STAGES),\
198-
$(eval $(call DEF_PREPARE_TARGET_N,$(stage),$(target),$(host))))))
191+
$(eval $(call DEF_PREPARE_TARGET_N,$(PREPARE_STAGE),$(target),$(host)))))
199192

200193
prepare-maybe-clean:
201194
$(if $(findstring true,$(PREPARE_CLEAN)),\

branches/snap-stage3/src/compiletest/compiletest.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ extern crate test;
1919
extern crate getopts;
2020
#[phase(link, syntax)]
2121
extern crate log;
22+
extern crate green;
23+
extern crate rustuv;
2224

2325
use std::os;
2426
use std::io;
@@ -41,6 +43,9 @@ pub mod runtest;
4143
pub mod common;
4244
pub mod errors;
4345

46+
#[start]
47+
fn start(argc: int, argv: **u8) -> int { green::start(argc, argv, main) }
48+
4449
pub fn main() {
4550
let args = os::args();
4651
let config = parse_config(args.move_iter().collect());

branches/snap-stage3/src/driver/driver.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,19 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[no_uv];
11+
#[no_uv]; // remove this after stage0
12+
#[allow(attribute_usage)]; // remove this after stage0
13+
extern crate native; // remove this after stage0
1214

1315
#[cfg(rustdoc)]
1416
extern crate this = "rustdoc";
1517

1618
#[cfg(rustc)]
1719
extern crate this = "rustc";
1820

19-
extern crate native;
21+
#[cfg(not(stage0))]
22+
fn main() { this::main() }
2023

24+
#[cfg(stage0)]
2125
#[start]
2226
fn start(argc: int, argv: **u8) -> int { native::start(argc, argv, this::main) }

branches/snap-stage3/src/libgreen/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ pub mod stack;
209209
pub mod task;
210210

211211
#[lang = "start"]
212-
#[cfg(not(test))]
212+
#[cfg(not(test), stage0)]
213213
pub fn lang_start(main: *u8, argc: int, argv: **u8) -> int {
214214
use std::cast;
215215
start(argc, argv, proc() {

branches/snap-stage3/src/libnative/lib.rs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858

5959
use std::os;
6060
use std::rt;
61+
use std::str;
6162

6263
pub mod io;
6364
pub mod task;
@@ -68,6 +69,16 @@ static OS_DEFAULT_STACK_ESTIMATE: uint = 1 << 20;
6869
#[cfg(unix, not(android))]
6970
static OS_DEFAULT_STACK_ESTIMATE: uint = 2 * (1 << 20);
7071

72+
#[lang = "start"]
73+
#[cfg(not(test), not(stage0))]
74+
pub fn lang_start(main: *u8, argc: int, argv: **u8) -> int {
75+
use std::cast;
76+
start(argc, argv, proc() {
77+
let main: extern "Rust" fn() = unsafe { cast::transmute(main) };
78+
main();
79+
})
80+
}
81+
7182
/// Executes the given procedure after initializing the runtime with the given
7283
/// argc/argv.
7384
///
@@ -90,7 +101,12 @@ pub fn start(argc: int, argv: **u8, main: proc()) -> int {
90101
rt::init(argc, argv);
91102
let mut exit_code = None;
92103
let mut main = Some(main);
93-
let t = task::new((my_stack_bottom, my_stack_top)).run(|| {
104+
let mut task = task::new((my_stack_bottom, my_stack_top));
105+
task.name = Some(str::Slice("<main>"));
106+
let t = task.run(|| {
107+
unsafe {
108+
rt::stack::record_stack_bounds(my_stack_bottom, my_stack_top);
109+
}
94110
exit_code = Some(run(main.take_unwrap()));
95111
});
96112
drop(t);

0 commit comments

Comments
 (0)