diff --git a/packages/flutter_tools/lib/src/web/compiler_config.dart b/packages/flutter_tools/lib/src/web/compiler_config.dart index 08883171f5..e2ee66cc2f 100644 --- a/packages/flutter_tools/lib/src/web/compiler_config.dart +++ b/packages/flutter_tools/lib/src/web/compiler_config.dart @@ -152,7 +152,7 @@ class WasmCompilerConfig extends WebCompilerConfig { final bool stripSymbols = buildMode == BuildMode.release && stripWasm; return [ '-O$optimizationLevel', - '--${stripSymbols ? 'no-' : ''}name-section', + '--${stripSymbols ? '' : 'no-'}strip-wasm', ]; } diff --git a/packages/flutter_tools/test/general.shard/build_system/targets/web_test.dart b/packages/flutter_tools/test/general.shard/build_system/targets/web_test.dart index 6385cbc239..85f45aefea 100644 --- a/packages/flutter_tools/test/general.shard/build_system/targets/web_test.dart +++ b/packages/flutter_tools/test/general.shard/build_system/targets/web_test.dart @@ -951,7 +951,7 @@ void main() { ], '--extra-compiler-option=--depfile=${depFile.absolute.path}', '-O$level', - if (strip && buildMode == 'release') '--no-name-section' else '--name-section', + if (strip && buildMode == 'release') '--strip-wasm' else '--no-strip-wasm', '-o', environment.buildDir.childFile('main.dart.wasm').absolute.path, environment.buildDir.childFile('main.dart').absolute.path,