Skip to content

Commit

Permalink
wasm32-wasi SDK doesn't support exceptions. This commit disables exce…
Browse files Browse the repository at this point in the history
…ptions when compile for wasm32-wasi.
  • Loading branch information
glebpom committed Oct 12, 2021
1 parent fd087c7 commit 3171ba8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bindings/rust/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ fn main() {
let mut cpp_config = cc::Build::new();
cpp_config.cpp(true);
cpp_config.include(&src_dir);

#[cfg(all(target_arch = "wasm32", target_os = "wasi"))]
cpp_config.flag_if_supported("-fno-exceptions");

cpp_config
.flag_if_supported("-Wno-unused-parameter")
.flag_if_supported("-Wno-unused-but-set-variable");
Expand Down

0 comments on commit 3171ba8

Please sign in to comment.