Skip to content

Commit 43a303d

Browse files
committed
Target definition for wasm32-wali-linux-musl to support the Wasm Linux
Interface This commit does not patch libc, stdarch, or cc
1 parent 0b6a207 commit 43a303d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Diff for: core/src/ffi/primitives.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ mod c_char_definition {
133133

134134
mod c_long_definition {
135135
cfg_if! {
136-
if #[cfg(all(target_pointer_width = "64", not(windows)))] {
136+
if #[cfg(any(
137+
all(target_pointer_width = "64", not(windows)),
138+
// wasm32 Linux ABI uses 64-bit long
139+
all(target_arch = "wasm32", target_os = "linux")))] {
137140
pub(super) type c_long = i64;
138141
pub(super) type c_ulong = u64;
139142
} else {

Diff for: unwind/src/libunwind.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,12 @@ pub const unwinder_private_data_size: usize = 2;
7272
#[cfg(any(target_arch = "riscv64", target_arch = "riscv32"))]
7373
pub const unwinder_private_data_size: usize = 2;
7474

75-
#[cfg(target_os = "emscripten")]
75+
#[cfg(all(target_arch = "wasm32", target_os = "emscripten"))]
7676
pub const unwinder_private_data_size: usize = 20;
7777

78+
#[cfg(all(target_arch = "wasm32", target_os = "linux"))]
79+
pub const unwinder_private_data_size: usize = 2;
80+
7881
#[cfg(all(target_arch = "hexagon", target_os = "linux"))]
7982
pub const unwinder_private_data_size: usize = 35;
8083

0 commit comments

Comments
 (0)