diff --git a/src/optimizer.rs b/src/optimizer.rs index 2d7b429..16854aa 100644 --- a/src/optimizer.rs +++ b/src/optimizer.rs @@ -330,6 +330,10 @@ pub fn optimize( } } + // Also drop all custom sections + module.sections_mut() + .retain(|section| if let elements::Section::Custom(_) = section { false } else { true }); + Ok(()) }