Skip to content

Commit 490056d

Browse files
committed
Update more rustc/libtest things for wasm64
* Add wasm64 variants for inline assembly along the same lines as wasm32 * Update a few directives in libtest to check for `target_family` instead of `target_arch` * Update some rustc codegen and typechecks specialized for wasm32 to also work for wasm64.
1 parent a3ad0e3 commit 490056d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/src/console.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ pub fn run_tests_console(opts: &TestOpts, tests: Vec<TestDescAndFn>) -> io::Resu
284284
// Prevent the usage of `Instant` in some cases:
285285
// - It's currently not supported for wasm targets.
286286
// - We disable it for miri because it's not available when isolation is enabled.
287-
let is_instant_supported = !cfg!(target_arch = "wasm32") && !cfg!(miri);
287+
let is_instant_supported = !cfg!(target_family = "wasm") && !cfg!(miri);
288288

289289
let start_time = is_instant_supported.then(Instant::now);
290290
run_tests(opts, tests, |x| on_test_event(&x, &mut st, &mut *out))?;

test/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ pub fn run_test(
470470

471471
// Emscripten can catch panics but other wasm targets cannot
472472
let ignore_because_no_process_support = desc.should_panic != ShouldPanic::No
473-
&& cfg!(target_arch = "wasm32")
473+
&& cfg!(target_family = "wasm")
474474
&& !cfg!(target_os = "emscripten");
475475

476476
if force_ignore || desc.ignore || ignore_because_no_process_support {
@@ -519,7 +519,7 @@ pub fn run_test(
519519
// If the platform is single-threaded we're just going to run
520520
// the test synchronously, regardless of the concurrency
521521
// level.
522-
let supports_threads = !cfg!(target_os = "emscripten") && !cfg!(target_arch = "wasm32");
522+
let supports_threads = !cfg!(target_os = "emscripten") && !cfg!(target_family = "wasm");
523523
if concurrency == Concurrent::Yes && supports_threads {
524524
let cfg = thread::Builder::new().name(name.as_slice().to_owned());
525525
let mut runtest = Arc::new(Mutex::new(Some(runtest)));

0 commit comments

Comments
 (0)