Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust some build directives for wasm64 #439

Merged
merged 2 commits into from
Oct 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ fn main() {
return;
}

// Forcibly enable memory intrinsics on wasm32 & SGX as we don't have a libc to
// Forcibly enable memory intrinsics on wasm & SGX as we don't have a libc to
// provide them.
if (target.contains("wasm32") && !target.contains("wasi"))
if (target.contains("wasm") && !target.contains("wasi"))
|| (target.contains("sgx") && target.contains("fortanix"))
|| target.contains("-none")
|| target.contains("nvptx")
Expand All @@ -50,13 +50,13 @@ fn main() {
if !cfg!(feature = "mangled-names") && cfg!(feature = "c") {
// Don't use a C compiler for these targets:
//
// * wasm32 - clang 8 for wasm is somewhat hard to come by and it's
// * wasm - clang for wasm is somewhat hard to come by and it's
// unlikely that the C is really that much better than our own Rust.
// * nvptx - everything is bitcode, not compatible with mixed C/Rust
// * riscv - the rust-lang/rust distribution container doesn't have a C
// compiler nor is cc-rs ready for compilation to riscv (at this
// time). This can probably be removed in the future
if !target.contains("wasm32") && !target.contains("nvptx") && !target.starts_with("riscv") {
if !target.contains("wasm") && !target.contains("nvptx") && !target.starts_with("riscv") {
#[cfg(feature = "c")]
c::compile(&llvm_target, &target);
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub mod float;
pub mod int;

#[cfg(any(
all(target_arch = "wasm32", target_os = "unknown"),
all(target_family = "wasm", target_os = "unknown"),
all(target_arch = "x86_64", target_os = "uefi"),
all(target_arch = "arm", target_os = "none"),
all(target_vendor = "fortanix", target_env = "sgx")
Expand Down
4 changes: 2 additions & 2 deletions src/math.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ macro_rules! no_mangle {

#[cfg(any(
all(
target_arch = "wasm32",
target_family = "wasm",
target_os = "unknown",
not(target_env = "wasi")
),
Expand Down Expand Up @@ -66,7 +66,7 @@ no_mangle! {

#[cfg(any(
all(
target_arch = "wasm32",
target_family = "wasm",
target_os = "unknown",
not(target_env = "wasi")
),
Expand Down