Skip to content

Commit 64e945d

Browse files
committed
---
yaml --- r: 227487 b: refs/heads/try c: 5ef2504 h: refs/heads/master i: 227485: 492feb7 227483: 5e4f153 227479: 191c3a9 227471: 364c2e1 227455: 21ed1ea v: v3
1 parent a5f5281 commit 64e945d

File tree

13 files changed

+94
-21
lines changed

13 files changed

+94
-21
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: 606e4b26c7a1215f8d0bc6f6aabec2c7eb196ae8
4+
refs/heads/try: 5ef250427d26af88a23e6e0d19bca00fc72ce2bc
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/configure

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,6 @@ fi
521521
DEFAULT_BUILD="${CFG_CPUTYPE}-${CFG_OSTYPE}"
522522

523523
CFG_SRC_DIR="$(abs_path $(dirname $0))/"
524-
CFG_SRC_DIR_RELATIVE="$(dirname $0)/"
525524
CFG_BUILD_DIR="$(pwd)/"
526525
CFG_SELF="$0"
527526
CFG_CONFIGURE_ARGS="$@"
@@ -1559,7 +1558,6 @@ done
15591558
step_msg "writing configuration"
15601559

15611560
putvar CFG_SRC_DIR
1562-
putvar CFG_SRC_DIR_RELATIVE
15631561
putvar CFG_BUILD_DIR
15641562
putvar CFG_OSTYPE
15651563
putvar CFG_CPUTYPE

branches/try/mk/cfg/x86_64-unknown-linux-musl.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ CC_x86_64-unknown-linux-musl=$(CFG_MUSL_ROOT)/bin/musl-gcc
33
CXX_x86_64-unknown-linux-musl=notaprogram
44
CPP_x86_64-unknown-linux-musl=$(CFG_MUSL_ROOT)/bin/musl-gcc -E
55
AR_x86_64-unknown-linux-musl=$(AR)
6+
CFG_INSTALL_ONLY_RLIB_x86_64-unknown-linux-musl = 1
67
CFG_LIB_NAME_x86_64-unknown-linux-musl=lib$(1).so
78
CFG_STATIC_LIB_NAME_x86_64-unknown-linux-musl=lib$(1).a
89
CFG_LIB_GLOB_x86_64-unknown-linux-musl=lib$(1)-*.so

branches/try/mk/crates.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ DOC_CRATES := std alloc collections core libc rustc_unicode
134134
#
135135
# $(1) is the crate to generate variables for
136136
define RUST_CRATE
137-
CRATEFILE_$(1) := $$(SREL)src/lib$(1)/lib.rs
137+
CRATEFILE_$(1) := $$(S)src/lib$(1)/lib.rs
138138
RSINPUTS_$(1) := $$(call rwildcard,$(S)src/lib$(1)/,*.rs)
139139
RUST_DEPS_$(1) := $$(filter-out native:%,$$(DEPS_$(1)))
140140
NATIVE_DEPS_$(1) := $$(patsubst native:%,%,$$(filter native:%,$$(DEPS_$(1))))

branches/try/mk/main.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ $(foreach host,$(CFG_HOST), \
322322
# exported
323323

324324
export CFG_SRC_DIR
325-
export CFG_SRC_DIR_RELATIVE
326325
export CFG_BUILD_DIR
327326
ifdef CFG_VER_DATE
328327
export CFG_VER_DATE

branches/try/mk/reconfig.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ Makefile config.mk: config.stamp
3434

3535
config.stamp: $(S)configure $(S)Makefile.in $(S)src/snapshots.txt
3636
@$(call E, cfg: reconfiguring)
37-
$(SREL)configure $(CFG_CONFIGURE_ARGS)
37+
$(S)configure $(CFG_CONFIGURE_ARGS)

branches/try/mk/util.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ print-%:
2020
@echo $*=$($*)
2121

2222
S := $(CFG_SRC_DIR)
23-
SREL := $(CFG_SRC_DIR_RELATIVE)

branches/try/src/compiletest/common.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ pub struct Config {
124124
// Flags to pass to the compiler when building for the target
125125
pub target_rustcflags: Option<String>,
126126

127+
// Run tests using the JIT
128+
pub jit: bool,
129+
127130
// Target system to be tested
128131
pub target: String,
129132

branches/try/src/compiletest/compiletest.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
7979
optopt("", "target-rustcflags", "flags to pass to rustc for target", "FLAGS"),
8080
optflag("", "verbose", "run tests verbosely, showing all output"),
8181
optopt("", "logfile", "file to log test execution to", "FILE"),
82+
optflag("", "jit", "run tests under the JIT"),
8283
optopt("", "target", "the target to build for", "TARGET"),
8384
optopt("", "host", "the host to build for", "HOST"),
8485
optopt("", "gdb-version", "the version of GDB used", "VERSION STRING"),
@@ -145,6 +146,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
145146
runtool: matches.opt_str("runtool"),
146147
host_rustcflags: matches.opt_str("host-rustcflags"),
147148
target_rustcflags: matches.opt_str("target-rustcflags"),
149+
jit: matches.opt_present("jit"),
148150
target: opt_str2(matches.opt_str("target")),
149151
host: opt_str2(matches.opt_str("host")),
150152
gdb_version: extract_gdb_version(matches.opt_str("gdb-version")),
@@ -184,6 +186,7 @@ pub fn log_config(config: &Config) {
184186
opt_str(&config.host_rustcflags)));
185187
logv(c, format!("target-rustcflags: {}",
186188
opt_str(&config.target_rustcflags)));
189+
logv(c, format!("jit: {}", config.jit));
187190
logv(c, format!("target: {}", config.target));
188191
logv(c, format!("host: {}", config.host));
189192
logv(c, format!("android-cross-path: {:?}",

branches/try/src/compiletest/runtest.rs

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,17 @@ fn run_cfail_test(config: &Config, props: &TestProps, testfile: &Path) {
9898
}
9999

100100
fn run_rfail_test(config: &Config, props: &TestProps, testfile: &Path) {
101-
let proc_res = compile_test(config, props, testfile);
101+
let proc_res = if !config.jit {
102+
let proc_res = compile_test(config, props, testfile);
102103

103-
if !proc_res.status.success() {
104-
fatal_proc_rec("compilation failed!", &proc_res);
105-
}
104+
if !proc_res.status.success() {
105+
fatal_proc_rec("compilation failed!", &proc_res);
106+
}
106107

107-
let proc_res = exec_compiled_test(config, props, testfile);
108+
exec_compiled_test(config, props, testfile)
109+
} else {
110+
jit_test(config, props, testfile)
111+
};
108112

109113
// The value our Makefile configures valgrind to return on failure
110114
const VALGRIND_ERR: i32 = 100;
@@ -129,16 +133,24 @@ fn check_correct_failure_status(proc_res: &ProcRes) {
129133
}
130134

131135
fn run_rpass_test(config: &Config, props: &TestProps, testfile: &Path) {
132-
let proc_res = compile_test(config, props, testfile);
136+
if !config.jit {
137+
let mut proc_res = compile_test(config, props, testfile);
133138

134-
if !proc_res.status.success() {
135-
fatal_proc_rec("compilation failed!", &proc_res);
136-
}
139+
if !proc_res.status.success() {
140+
fatal_proc_rec("compilation failed!", &proc_res);
141+
}
137142

138-
let proc_res = exec_compiled_test(config, props, testfile);
143+
proc_res = exec_compiled_test(config, props, testfile);
139144

140-
if !proc_res.status.success() {
141-
fatal_proc_rec("test run failed!", &proc_res);
145+
if !proc_res.status.success() {
146+
fatal_proc_rec("test run failed!", &proc_res);
147+
}
148+
} else {
149+
let proc_res = jit_test(config, props, testfile);
150+
151+
if !proc_res.status.success() {
152+
fatal_proc_rec("jit failed!", &proc_res);
153+
}
142154
}
143155
}
144156

@@ -1129,6 +1141,10 @@ fn compile_test(config: &Config, props: &TestProps,
11291141
compile_test_(config, props, testfile, &[])
11301142
}
11311143

1144+
fn jit_test(config: &Config, props: &TestProps, testfile: &Path) -> ProcRes {
1145+
compile_test_(config, props, testfile, &["--jit".to_string()])
1146+
}
1147+
11321148
fn compile_test_(config: &Config, props: &TestProps,
11331149
testfile: &Path, extra_args: &[String]) -> ProcRes {
11341150
let aux_dir = aux_output_dir_name(config, testfile);

branches/try/src/libcore/fmt/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ pub trait Write {
7272
///
7373
/// # Errors
7474
///
75-
/// This function will return an instance of `Error` on error.
75+
/// This function will return an instance of `FormatError` on error.
7676
#[stable(feature = "rust1", since = "1.0.0")]
7777
fn write_str(&mut self, s: &str) -> Result;
7878

@@ -85,7 +85,7 @@ pub trait Write {
8585
///
8686
/// # Errors
8787
///
88-
/// This function will return an instance of `Error` on error.
88+
/// This function will return an instance of `FormatError` on error.
8989
#[stable(feature = "fmt_write_char", since = "1.1.0")]
9090
fn write_char(&mut self, c: char) -> Result {
9191
let mut utf_8 = [0u8; 4];
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// ignore-test linked failure
12+
// error-pattern:explicit failure
13+
// Testing that runtime failure doesn't cause callbacks to abort abnormally.
14+
// Instead the failure will be delivered after the callbacks return.
15+
#![feature(std_misc, libc)]
16+
17+
extern crate libc;
18+
use std::task;
19+
20+
mod rustrt {
21+
extern crate libc;
22+
23+
extern {
24+
pub fn rust_dbg_call(cb: *u8, data: libc::uintptr_t)
25+
-> libc::uintptr_t;
26+
}
27+
}
28+
29+
extern fn cb(data: libc::uintptr_t) -> libc::uintptr_t {
30+
if data == 1 {
31+
data
32+
} else {
33+
count(data - 1) + count(data - 1)
34+
}
35+
}
36+
37+
fn count(n: usize) -> usize {
38+
unsafe {
39+
task::deschedule();
40+
rustrt::rust_dbg_call(cb, n)
41+
}
42+
}
43+
44+
fn main() {
45+
for _ in 0..10 {
46+
task::spawn(move|| {
47+
let result = count(5);
48+
println!("result = %?", result);
49+
panic!();
50+
});
51+
}
52+
}

branches/try/src/test/run-pass/html-literals.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// A test of the macro system. Can we do HTML literals?
1212

13+
// ignore-test FIXME #20673
14+
1315
/*
1416
1517
This is an HTML parser written as a macro. It's all CPS, and we have

0 commit comments

Comments
 (0)