Skip to content

Commit 90bab97

Browse files
committed
prtest:full
Signed-off-by: James Sturtevant <jstur@microsoft.com>
1 parent f13938e commit 90bab97

3 files changed

Lines changed: 21 additions & 4 deletions

File tree

crates/wasi-tls/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg(not(any(target_arch = "riscv64", target_arch = "s390x")))]
2+
13
//! # Wasmtime's [wasi-tls] (Transport Layer Security) Implementation
24
//!
35
//! This crate provides the Wasmtime host implementation for the [wasi-tls] API.
@@ -60,7 +62,6 @@
6062
//! })?;
6163
//!
6264
//! // ... use `linker` to instantiate within `store` ...
63-
//!
6465
//! Ok(())
6566
//! }
6667
//!

crates/wasi-tls/tests/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg(not(any(target_arch = "riscv64", target_arch = "s390x")))]
2+
13
use anyhow::{anyhow, Result};
24
use test_programs_artifacts::{foreach_tls, TLS_SAMPLE_APPLICATION_COMPONENT};
35
use wasmtime::{

src/commands/run.rs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ use wasmtime_wasi_http::{
3232
#[cfg(feature = "wasi-keyvalue")]
3333
use wasmtime_wasi_keyvalue::{WasiKeyValue, WasiKeyValueCtx, WasiKeyValueCtxBuilder};
3434

35-
#[cfg(feature = "wasi-tls")]
35+
#[cfg(all(
36+
feature = "wasi-tls",
37+
not(any(target_arch = "riscv64", target_arch = "s390x"))
38+
))]
3639
use wasmtime_wasi_tls::WasiTlsCtx;
3740

3841
fn parse_preloads(s: &str) -> Result<(String, PathBuf)> {
@@ -829,11 +832,22 @@ impl RunCommand {
829832
}
830833

831834
if self.run.common.wasi.tls == Some(true) {
832-
#[cfg(not(all(feature = "wasi-tls", feature = "component-model")))]
835+
#[cfg(any(target_arch = "riscv64", target_arch = "s390x"))]
836+
{
837+
bail!("Unsupported architecture for wasi-tls");
838+
}
839+
#[cfg(all(
840+
not(any(target_arch = "riscv64", target_arch = "s390x")),
841+
not(all(feature = "wasi-tls", feature = "component-model"))
842+
))]
833843
{
834844
bail!("Cannot enable wasi-tls when the binary is not compiled with this feature.");
835845
}
836-
#[cfg(all(feature = "wasi-tls", feature = "component-model"))]
846+
#[cfg(all(
847+
feature = "wasi-tls",
848+
feature = "component-model",
849+
not(any(target_arch = "riscv64", target_arch = "s390x"))
850+
))]
837851
{
838852
match linker {
839853
CliLinker::Core(_) => {

0 commit comments

Comments
 (0)