From c9ee88bda3b46d251440e17d18727f40e2f871e4 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 18 Jun 2019 11:01:31 -0700 Subject: [PATCH] Preserve the function table during early gc passes Recent refactorings of wasm-bindgen have inserted multiple `gc` passes executed by walrus. In these passes though the function table was being removed a bit too aggressively because it's not exported by LLD and it's only later that we realize we need to export it. To handle this case we add synthetic and temporary exports of the function table and these exports are removed just after the GC pass in question. Closes #1603 --- crates/cli-support/src/descriptors.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/crates/cli-support/src/descriptors.rs b/crates/cli-support/src/descriptors.rs index aef97a14762..3c0c9b6fa66 100644 --- a/crates/cli-support/src/descriptors.rs +++ b/crates/cli-support/src/descriptors.rs @@ -40,7 +40,24 @@ pub fn execute(module: &mut Module) -> Result