From ce6e967eebc7e293950394ba212689190e2cf0ed Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 18 Dec 2020 14:12:02 -0600 Subject: [PATCH] Add a CLI option for module linking (#2524) * Add a CLI option for module linking Forgot to add this earlier! * Always apt-get update before install --- .github/workflows/main.yml | 2 +- src/lib.rs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b42f8a9db..3885cd9f09 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -286,7 +286,7 @@ jobs: # Test debug (DWARF) related functionality. - run: | - sudo apt-get install -y gdb + sudo apt-get update && sudo apt-get install -y gdb cargo test test_debug_dwarf -- --ignored --test-threads 1 if: matrix.os == 'ubuntu-latest' env: diff --git a/src/lib.rs b/src/lib.rs index b7eaaa8a09..39bda21f66 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -127,6 +127,10 @@ struct CommonOptions { #[structopt(long)] enable_multi_memory: bool, + /// Enable support for the module-linking proposal + #[structopt(long)] + enable_module_linking: bool, + /// Enable all experimental Wasm features #[structopt(long)] enable_all: bool, @@ -198,6 +202,7 @@ impl CommonOptions { .wasm_multi_value(self.enable_multi_value.unwrap_or(true) || self.enable_all) .wasm_threads(self.enable_threads || self.enable_all) .wasm_multi_memory(self.enable_multi_memory || self.enable_all) + .wasm_module_linking(self.enable_module_linking || self.enable_all) .cranelift_opt_level(self.opt_level()) .strategy(pick_compilation_strategy(self.cranelift, self.lightbeam)?)? .profiler(pick_profiling_strategy(self.jitdump, self.vtune)?)?