Skip to content

Commit d2583ad

Browse files
committed
---
yaml --- r: 227161 b: refs/heads/auto c: 50141d7 h: refs/heads/master i: 227159: 0fbdc8f v: v3
1 parent 2e34f6c commit d2583ad

File tree

147 files changed

+1337
-2126
lines changed

Some content is hidden

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

147 files changed

+1337
-2126
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: b51e0090696c82c6156bbfcd0e67ac68df67379b
11+
refs/heads/auto: 50141d7e1e5b1b539d45240dff709fa68e7472c2
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/mk/clean.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ 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
105104
$$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libcompiler-rt.a
106105
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/librun_pass_stage* # For unix
107106
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/run_pass_stage* # For windows

branches/auto/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 native:rustrt_native \
68+
native:rust_builtin native:backtrace \
6969
rustc_bitflags
7070
DEPS_graphviz := std
7171
DEPS_syntax := std term serialize log fmt_macros arena libc

branches/auto/mk/main.mk

Lines changed: 6 additions & 1 deletion
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
166+
RUSTFLAGS_STAGE0 += -C prefer-dynamic -C no-stack-check
167167
RUSTFLAGS_STAGE1 += -C prefer-dynamic
168168
RUST_LIB_FLAGS_ST2 += -C prefer-dynamic
169169
RUST_LIB_FLAGS_ST3 += -C prefer-dynamic
@@ -400,6 +400,11 @@ 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+
403408
# Prerequisites for a working stageN compiler and libraries, for a specific
404409
# target
405410
SREQ$(1)_T_$(2)_H_$(3) = \

branches/auto/mk/platform.mk

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@ 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),morestack) \
117-
$$(call CFG_STATIC_LIB_NAME_$(1),compiler-rt)
116+
INSTALLED_OBJECTS_$(1) += $$(call CFG_STATIC_LIB_NAME_$(1),compiler-rt)
118117
endef
119118

120119
$(foreach target,$(CFG_TARGET), \
@@ -278,10 +277,15 @@ $(foreach target,$(CFG_TARGET), \
278277
# Fun times!
279278
#
280279
# [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)
281285
define ADD_RUSTC_LLVM_DEF_TO_MSVC
282286
ifeq ($$(findstring msvc,$(1)),msvc)
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
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
285289

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

branches/auto/mk/rt.mk

Lines changed: 3 additions & 5 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 morestack miniz \
39-
rustrt_native rust_test_helpers
38+
NATIVE_LIBS := rust_builtin hoedown miniz \
39+
rust_test_helpers morestack
4040

4141
# $(1) is the target triple
4242
define NATIVE_LIBRARIES
@@ -53,10 +53,8 @@ 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
5756
NATIVE_DEPS_rust_test_helpers_$(1) := rust_test_helpers.c
58-
NATIVE_DEPS_morestack_$(1) := arch/$$(HOST_$(1))/morestack.S
59-
57+
NATIVE_DEPS_morestack_$(1) := empty.c
6058

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

branches/auto/mk/target.mk

Lines changed: 3 additions & 4 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_$(4)_T_$(2))
43+
$$(CUSTOM_DEPS$(1)_$(4)_T_$(2))
4444
endef
4545

4646
$(foreach host,$(CFG_HOST), \
@@ -56,8 +56,7 @@ $(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, along
60-
# with the morestack library
59+
# 3. The stage (n-1) compiler is required through the TSREQ dependency
6160
# 4. When actually executing the rule, the first thing we do is to clean out
6261
# old libs and rlibs via the REMOVE_ALL_OLD_GLOB_MATCHES macro
6362
# 5. Finally, we get around to building the actual crate. It's just one
@@ -93,7 +92,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
9392
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
9493
$$(LLVM_STDCPP_RUSTFLAGS_$(2)) \
9594
$$(RUSTFLAGS_$(4)) \
96-
$$(RUSTFLAGS_$(4)_T_$(2)) \
95+
$$(RUSTFLAGS$(1)_$(4)_T_$(2)) \
9796
--out-dir $$(@D) \
9897
-C extra-filename=-$$(CFG_FILENAME_EXTRA) \
9998
$$<

branches/auto/src/compiletest/procsrv.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ 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-
let newpath = newpath.to_str().unwrap().to_string();
30-
cmd.env(var, &newpath);
29+
cmd.env(var, newpath);
3130
}
3231

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

branches/auto/src/doc/reference.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,10 +1924,16 @@ 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 `kind`
1928-
key with three possible values: `dylib`, `static`, and `framework`. See [external blocks](#external-blocks) for more about external blocks. Two
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
19291930
examples: `#[link(name = "readline")]` and
19301931
`#[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.
19311937

19321938
On declarations inside an `extern` block, the following attributes are
19331939
interpreted:

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

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

54-
#[lang = "stack_exhausted"] extern fn stack_exhausted() {}
5554
#[lang = "eh_personality"] extern fn eh_personality() {}
5655
#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} }
5756
# #[lang = "eh_unwind_resume"] extern fn rust_eh_unwind_resume() {}

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

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ 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() {}
4039
#[lang = "eh_personality"] extern fn eh_personality() {}
4140
#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} }
4241
# #[lang = "eh_unwind_resume"] extern fn rust_eh_unwind_resume() {}
@@ -61,7 +60,6 @@ pub extern fn main(argc: i32, argv: *const *const u8) -> i32 {
6160
0
6261
}
6362
64-
#[lang = "stack_exhausted"] extern fn stack_exhausted() {}
6563
#[lang = "eh_personality"] extern fn eh_personality() {}
6664
#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} }
6765
# #[lang = "eh_unwind_resume"] extern fn rust_eh_unwind_resume() {}
@@ -73,18 +71,12 @@ The compiler currently makes a few assumptions about symbols which are available
7371
in the executable to call. Normally these functions are provided by the standard
7472
library, but without it you must define your own.
7573

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
74+
The first of these two functions, `eh_personality`, is used by the
8375
failure mechanisms of the compiler. This is often mapped to GCC's
8476
personality function (see the
8577
[libstd implementation](../std/rt/unwind/index.html) for more
8678
information), but crates which do not trigger a panic can be assured
87-
that this function is never called. The final function, `panic_fmt`, is
79+
that this function is never called. The second function, `panic_fmt`, is
8880
also used by the failure mechanisms of the compiler.
8981

9082
## Using libcore
@@ -150,7 +142,6 @@ extern fn panic_fmt(args: &core::fmt::Arguments,
150142
loop {}
151143
}
152144
153-
#[lang = "stack_exhausted"] extern fn stack_exhausted() {}
154145
#[lang = "eh_personality"] extern fn eh_personality() {}
155146
# #[lang = "eh_unwind_resume"] extern fn rust_eh_unwind_resume() {}
156147
# #[start] fn start(argc: isize, argv: *const *const u8) -> isize { 0 }

0 commit comments

Comments
 (0)