Remove --cfg no_unstable_features
This commit is contained in:
parent
3d54358b64
commit
30be8bcb45
@ -329,7 +329,6 @@ pub(crate) fn run_tests(
|
|||||||
struct TestRunner<'a> {
|
struct TestRunner<'a> {
|
||||||
is_native: bool,
|
is_native: bool,
|
||||||
jit_supported: bool,
|
jit_supported: bool,
|
||||||
use_unstable_features: bool,
|
|
||||||
skip_tests: &'a [&'a str],
|
skip_tests: &'a [&'a str],
|
||||||
dirs: Dirs,
|
dirs: Dirs,
|
||||||
target_compiler: Compiler,
|
target_compiler: Compiler,
|
||||||
@ -361,15 +360,7 @@ fn new(
|
|||||||
&& target_compiler.triple.contains("x86_64")
|
&& target_compiler.triple.contains("x86_64")
|
||||||
&& !target_compiler.triple.contains("windows");
|
&& !target_compiler.triple.contains("windows");
|
||||||
|
|
||||||
Self {
|
Self { is_native, jit_supported, skip_tests, dirs, target_compiler, stdlib_source }
|
||||||
is_native,
|
|
||||||
jit_supported,
|
|
||||||
use_unstable_features,
|
|
||||||
skip_tests,
|
|
||||||
dirs,
|
|
||||||
target_compiler,
|
|
||||||
stdlib_source,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn run_testsuite(&self, tests: &[TestCase]) {
|
fn run_testsuite(&self, tests: &[TestCase]) {
|
||||||
@ -393,31 +384,13 @@ fn run_testsuite(&self, tests: &[TestCase]) {
|
|||||||
match *cmd {
|
match *cmd {
|
||||||
TestCaseCmd::Custom { func } => func(self),
|
TestCaseCmd::Custom { func } => func(self),
|
||||||
TestCaseCmd::BuildLib { source, crate_types } => {
|
TestCaseCmd::BuildLib { source, crate_types } => {
|
||||||
if self.use_unstable_features {
|
self.run_rustc([source, "--crate-type", crate_types]);
|
||||||
self.run_rustc([source, "--crate-type", crate_types]);
|
|
||||||
} else {
|
|
||||||
self.run_rustc([
|
|
||||||
source,
|
|
||||||
"--crate-type",
|
|
||||||
crate_types,
|
|
||||||
"--cfg",
|
|
||||||
"no_unstable_features",
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
TestCaseCmd::BuildBin { source } => {
|
TestCaseCmd::BuildBin { source } => {
|
||||||
if self.use_unstable_features {
|
self.run_rustc([source]);
|
||||||
self.run_rustc([source]);
|
|
||||||
} else {
|
|
||||||
self.run_rustc([source, "--cfg", "no_unstable_features"]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
TestCaseCmd::BuildBinAndRun { source, args } => {
|
TestCaseCmd::BuildBinAndRun { source, args } => {
|
||||||
if self.use_unstable_features {
|
self.run_rustc([source]);
|
||||||
self.run_rustc([source]);
|
|
||||||
} else {
|
|
||||||
self.run_rustc([source, "--cfg", "no_unstable_features"]);
|
|
||||||
}
|
|
||||||
self.run_out_command(
|
self.run_out_command(
|
||||||
source.split('/').last().unwrap().split('.').next().unwrap(),
|
source.split('/').last().unwrap().split('.').next().unwrap(),
|
||||||
args,
|
args,
|
||||||
@ -472,7 +445,6 @@ fn rustc_command<I, S>(&self, args: I) -> Command
|
|||||||
cmd.arg(&self.target_compiler.triple);
|
cmd.arg(&self.target_compiler.triple);
|
||||||
cmd.arg("-Cpanic=abort");
|
cmd.arg("-Cpanic=abort");
|
||||||
cmd.arg("-Zunstable-options");
|
cmd.arg("-Zunstable-options");
|
||||||
cmd.arg("--check-cfg=cfg(no_unstable_features)");
|
|
||||||
cmd.arg("--check-cfg=cfg(jit)");
|
cmd.arg("--check-cfg=cfg(jit)");
|
||||||
cmd.args(args);
|
cmd.args(args);
|
||||||
cmd
|
cmd
|
||||||
|
@ -333,12 +333,7 @@ struct ExternTypeWrapper {
|
|||||||
#[cfg(all(not(jit), not(all(windows, target_env = "gnu"))))]
|
#[cfg(all(not(jit), not(all(windows, target_env = "gnu"))))]
|
||||||
test_tls();
|
test_tls();
|
||||||
|
|
||||||
#[cfg(all(
|
#[cfg(all(not(jit), target_arch = "x86_64", any(target_os = "linux", target_os = "macos")))]
|
||||||
not(jit),
|
|
||||||
not(no_unstable_features),
|
|
||||||
target_arch = "x86_64",
|
|
||||||
any(target_os = "linux", target_os = "macos")
|
|
||||||
))]
|
|
||||||
unsafe {
|
unsafe {
|
||||||
global_asm_test();
|
global_asm_test();
|
||||||
naked_test();
|
naked_test();
|
||||||
@ -367,17 +362,12 @@ fn stack_val_align() {
|
|||||||
assert_eq!(&a as *const Foo as usize % 8192, 0);
|
assert_eq!(&a as *const Foo as usize % 8192, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(
|
#[cfg(all(not(jit), target_arch = "x86_64", any(target_os = "linux", target_os = "macos")))]
|
||||||
not(jit),
|
|
||||||
not(no_unstable_features),
|
|
||||||
target_arch = "x86_64",
|
|
||||||
any(target_os = "linux", target_os = "macos")
|
|
||||||
))]
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
fn global_asm_test();
|
fn global_asm_test();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(not(jit), not(no_unstable_features), target_arch = "x86_64", target_os = "linux"))]
|
#[cfg(all(not(jit), target_arch = "x86_64", target_os = "linux"))]
|
||||||
global_asm! {
|
global_asm! {
|
||||||
"
|
"
|
||||||
.global global_asm_test
|
.global global_asm_test
|
||||||
@ -387,7 +377,7 @@ fn stack_val_align() {
|
|||||||
"
|
"
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(not(jit), not(no_unstable_features), target_arch = "x86_64", target_os = "macos"))]
|
#[cfg(all(not(jit), target_arch = "x86_64", target_os = "macos"))]
|
||||||
global_asm! {
|
global_asm! {
|
||||||
"
|
"
|
||||||
.global _global_asm_test
|
.global _global_asm_test
|
||||||
@ -397,7 +387,7 @@ fn stack_val_align() {
|
|||||||
"
|
"
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(not(jit), not(no_unstable_features), target_arch = "x86_64"))]
|
#[cfg(all(not(jit), target_arch = "x86_64"))]
|
||||||
#[naked]
|
#[naked]
|
||||||
extern "C" fn naked_test() {
|
extern "C" fn naked_test() {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
Loading…
Reference in New Issue
Block a user