Skip to content

Commit f8cc830

Browse files
pnkfelixsfackler
authored andcommitted
---
yaml --- r: 229339 b: refs/heads/try c: 91f5d32 h: refs/heads/master i: 229337: e2ab2ec 229335: 36f4c03 v: v3
1 parent ba71f2c commit f8cc830

File tree

148 files changed

+2126
-1373
lines changed

Some content is hidden

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

148 files changed

+2126
-1373
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: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 8b3705528ab6a7511928d46c654cc0040272f48d
4+
refs/heads/try: 91f5d3275f110f627931646fb19f22d8c4dd41c3
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/mk/clean.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ define CLEAN_TARGET_STAGE_N
101101
clean$(1)_T_$(2)_H_$(3): \
102102
$$(foreach crate,$$(CRATES),clean$(1)_T_$(2)_H_$(3)-lib-$$(crate)) \
103103
$$(foreach tool,$$(TOOLS) $$(DEBUGGER_BIN_SCRIPTS_ALL),clean$(1)_T_$(2)_H_$(3)-tool-$$(tool))
104+
$$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a
104105
$$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libcompiler-rt.a
105106
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/librun_pass_stage* # For unix
106107
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/run_pass_stage* # For windows

branches/try/mk/crates.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ DEPS_libc := core
6565
DEPS_rustc_unicode := core
6666
DEPS_alloc := core libc native:jemalloc
6767
DEPS_std := core libc rand alloc collections rustc_unicode \
68-
native:rust_builtin native:backtrace \
68+
native:rust_builtin native:backtrace native:rustrt_native \
6969
rustc_bitflags
7070
DEPS_graphviz := std
7171
DEPS_syntax := std term serialize log fmt_macros arena libc

branches/try/mk/main.mk

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ endif
163163
# that the snapshot will be generated with a statically linked rustc so we only
164164
# have to worry about the distribution of one file (with its native dynamic
165165
# dependencies)
166-
RUSTFLAGS_STAGE0 += -C prefer-dynamic -C no-stack-check
166+
RUSTFLAGS_STAGE0 += -C prefer-dynamic
167167
RUSTFLAGS_STAGE1 += -C prefer-dynamic
168168
RUST_LIB_FLAGS_ST2 += -C prefer-dynamic
169169
RUST_LIB_FLAGS_ST3 += -C prefer-dynamic
@@ -400,11 +400,6 @@ TSREQ$(1)_T_$(2)_H_$(3) = \
400400
$$(foreach obj,$$(INSTALLED_OBJECTS_$(2)),\
401401
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(obj))
402402

403-
ifeq ($(1),0)
404-
TSREQ$(1)_T_$(2)_H_$(3) += \
405-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(call CFG_STATIC_LIB_NAME_$(2),morestack)
406-
endif
407-
408403
# Prerequisites for a working stageN compiler and libraries, for a specific
409404
# target
410405
SREQ$(1)_T_$(2)_H_$(3) = \

branches/try/mk/platform.mk

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ CFG_RLIB_GLOB=lib$(1)-*.rlib
113113
include $(wildcard $(CFG_SRC_DIR)mk/cfg/*.mk)
114114

115115
define ADD_INSTALLED_OBJECTS
116-
INSTALLED_OBJECTS_$(1) += $$(call CFG_STATIC_LIB_NAME_$(1),compiler-rt)
116+
INSTALLED_OBJECTS_$(1) += $$(call CFG_STATIC_LIB_NAME_$(1),morestack) \
117+
$$(call CFG_STATIC_LIB_NAME_$(1),compiler-rt)
117118
endef
118119

119120
$(foreach target,$(CFG_TARGET), \
@@ -277,15 +278,10 @@ $(foreach target,$(CFG_TARGET), \
277278
# Fun times!
278279
#
279280
# [1]: https://msdn.microsoft.com/en-us/library/28d6s79h.aspx
280-
#
281-
# FIXME(stage0): remove this macro and the usage below (and the commments above)
282-
# when a new snapshot is available. Also remove the
283-
# RUSTFLAGS$(1)_.._T_ variable in mk/target.mk along with
284-
# CUSTOM_DEPS (as they were only added for this)
285281
define ADD_RUSTC_LLVM_DEF_TO_MSVC
286282
ifeq ($$(findstring msvc,$(1)),msvc)
287-
RUSTFLAGS0_rustc_llvm_T_$(1) += -C link-args="-DEF:$(1)/rt/rustc_llvm.def"
288-
CUSTOM_DEPS0_rustc_llvm_T_$(1) += $(1)/rt/rustc_llvm.def
283+
RUSTFLAGS_rustc_llvm_T_$(1) += -C link-args="-DEF:$(1)/rt/rustc_llvm.def"
284+
CUSTOM_DEPS_rustc_llvm_T_$(1) += $(1)/rt/rustc_llvm.def
289285

290286
$(1)/rt/rustc_llvm.def: $$(S)src/etc/mklldef.py $$(S)src/librustc_llvm/lib.rs
291287
$$(CFG_PYTHON) $$^ $$@ rustc_llvm-$$(CFG_FILENAME_EXTRA)

branches/try/mk/rt.mk

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
# that's per-target so you're allowed to conditionally add files based on the
3636
# target.
3737
################################################################################
38-
NATIVE_LIBS := rust_builtin hoedown miniz \
39-
rust_test_helpers morestack
38+
NATIVE_LIBS := rust_builtin hoedown morestack miniz \
39+
rustrt_native rust_test_helpers
4040

4141
# $(1) is the target triple
4242
define NATIVE_LIBRARIES
@@ -53,8 +53,10 @@ NATIVE_DEPS_hoedown_$(1) := hoedown/src/autolink.c \
5353
NATIVE_DEPS_miniz_$(1) = miniz.c
5454
NATIVE_DEPS_rust_builtin_$(1) := rust_builtin.c \
5555
rust_android_dummy.c
56+
NATIVE_DEPS_rustrt_native_$(1) := arch/$$(HOST_$(1))/record_sp.S
5657
NATIVE_DEPS_rust_test_helpers_$(1) := rust_test_helpers.c
57-
NATIVE_DEPS_morestack_$(1) := empty.c
58+
NATIVE_DEPS_morestack_$(1) := arch/$$(HOST_$(1))/morestack.S
59+
5860

5961
################################################################################
6062
# You shouldn't find it that necessary to edit anything below this line.

branches/try/mk/target.mk

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ CRATE_FULLDEPS_$(1)_T_$(2)_H_$(3)_$(4) := \
4040
$$(RT_OUTPUT_DIR_$(2))/$$(dep)) \
4141
$$(foreach dep,$$(NATIVE_TOOL_DEPS_$(4)_T_$(2)), \
4242
$$(TBIN$(1)_T_$(3)_H_$(3))/$$(dep)) \
43-
$$(CUSTOM_DEPS$(1)_$(4)_T_$(2))
43+
$$(CUSTOM_DEPS_$(4)_T_$(2))
4444
endef
4545

4646
$(foreach host,$(CFG_HOST), \
@@ -56,7 +56,8 @@ $(foreach host,$(CFG_HOST), \
5656
# 1. The immediate dependencies are the rust source files
5757
# 2. Each rust crate dependency is listed (based on their stamp files),
5858
# as well as all native dependencies (listed in RT_OUTPUT_DIR)
59-
# 3. The stage (n-1) compiler is required through the TSREQ dependency
59+
# 3. The stage (n-1) compiler is required through the TSREQ dependency, along
60+
# with the morestack library
6061
# 4. When actually executing the rule, the first thing we do is to clean out
6162
# old libs and rlibs via the REMOVE_ALL_OLD_GLOB_MATCHES macro
6263
# 5. Finally, we get around to building the actual crate. It's just one
@@ -92,7 +93,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
9293
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
9394
$$(LLVM_STDCPP_RUSTFLAGS_$(2)) \
9495
$$(RUSTFLAGS_$(4)) \
95-
$$(RUSTFLAGS$(1)_$(4)_T_$(2)) \
96+
$$(RUSTFLAGS_$(4)_T_$(2)) \
9697
--out-dir $$(@D) \
9798
-C extra-filename=-$$(CFG_FILENAME_EXTRA) \
9899
$$<

branches/try/src/compiletest/procsrv.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ fn add_target_env(cmd: &mut Command, lib_path: &str, aux_path: Option<&str>) {
2626
// Add the new dylib search path var
2727
let var = DynamicLibrary::envvar();
2828
let newpath = DynamicLibrary::create_path(&path);
29-
cmd.env(var, newpath);
29+
let newpath = newpath.to_str().unwrap().to_string();
30+
cmd.env(var, &newpath);
3031
}
3132

3233
pub struct Result {pub status: ExitStatus, pub out: String, pub err: String}

branches/try/src/doc/reference.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,16 +1924,10 @@ On an `extern` block, the following attributes are interpreted:
19241924
name and type. This is feature gated and the exact behavior is
19251925
implementation-defined (due to variety of linker invocation syntax).
19261926
- `link` - indicate that a native library should be linked to for the
1927-
declarations in this block to be linked correctly. `link` supports an optional
1928-
`kind` key with three possible values: `dylib`, `static`, and `framework`. See
1929-
[external blocks](#external-blocks) for more about external blocks. Two
1927+
declarations in this block to be linked correctly. `link` supports an optional `kind`
1928+
key with three possible values: `dylib`, `static`, and `framework`. See [external blocks](#external-blocks) for more about external blocks. Two
19301929
examples: `#[link(name = "readline")]` and
19311930
`#[link(name = "CoreFoundation", kind = "framework")]`.
1932-
- `linked_from` - indicates what native library this block of FFI items is
1933-
coming from. This attribute is of the form `#[linked_from = "foo"]` where
1934-
`foo` is the name of a library in either `#[link]` or a `-l` flag. This
1935-
attribute is currently required to export symbols from a Rust dynamic library
1936-
on Windows, and it is feature gated behind the `linked_from` feature.
19371931

19381932
On declarations inside an `extern` block, the following attributes are
19391933
interpreted:

branches/try/src/doc/trpl/lang-items.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ fn main(argc: isize, argv: *const *const u8) -> isize {
5151
0
5252
}
5353

54+
#[lang = "stack_exhausted"] extern fn stack_exhausted() {}
5455
#[lang = "eh_personality"] extern fn eh_personality() {}
5556
#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} }
5657
# #[lang = "eh_unwind_resume"] extern fn rust_eh_unwind_resume() {}

branches/try/src/doc/trpl/no-stdlib.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ fn start(_argc: isize, _argv: *const *const u8) -> isize {
3636
// These functions and traits are used by the compiler, but not
3737
// for a bare-bones hello world. These are normally
3838
// provided by libstd.
39+
#[lang = "stack_exhausted"] extern fn stack_exhausted() {}
3940
#[lang = "eh_personality"] extern fn eh_personality() {}
4041
#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} }
4142
# #[lang = "eh_unwind_resume"] extern fn rust_eh_unwind_resume() {}
@@ -60,6 +61,7 @@ pub extern fn main(argc: i32, argv: *const *const u8) -> i32 {
6061
0
6162
}
6263
64+
#[lang = "stack_exhausted"] extern fn stack_exhausted() {}
6365
#[lang = "eh_personality"] extern fn eh_personality() {}
6466
#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} }
6567
# #[lang = "eh_unwind_resume"] extern fn rust_eh_unwind_resume() {}
@@ -71,12 +73,18 @@ The compiler currently makes a few assumptions about symbols which are available
7173
in the executable to call. Normally these functions are provided by the standard
7274
library, but without it you must define your own.
7375

74-
The first of these two functions, `eh_personality`, is used by the
76+
The first of these three functions, `stack_exhausted`, is invoked whenever stack
77+
overflow is detected. This function has a number of restrictions about how it
78+
can be called and what it must do, but if the stack limit register is not being
79+
maintained then a thread always has an "infinite stack" and this function
80+
shouldn't get triggered.
81+
82+
The second of these three functions, `eh_personality`, is used by the
7583
failure mechanisms of the compiler. This is often mapped to GCC's
7684
personality function (see the
7785
[libstd implementation](../std/rt/unwind/index.html) for more
7886
information), but crates which do not trigger a panic can be assured
79-
that this function is never called. The second function, `panic_fmt`, is
87+
that this function is never called. The final function, `panic_fmt`, is
8088
also used by the failure mechanisms of the compiler.
8189

8290
## Using libcore
@@ -142,6 +150,7 @@ extern fn panic_fmt(args: &core::fmt::Arguments,
142150
loop {}
143151
}
144152
153+
#[lang = "stack_exhausted"] extern fn stack_exhausted() {}
145154
#[lang = "eh_personality"] extern fn eh_personality() {}
146155
# #[lang = "eh_unwind_resume"] extern fn rust_eh_unwind_resume() {}
147156
# #[start] fn start(argc: isize, argv: *const *const u8) -> isize { 0 }

0 commit comments

Comments
 (0)