Use --(no-)strip-wams instead of --(no-)-name-section in dart compile wasm (#150180)

This commit is contained in:
Martin Kustermann 2024-06-13 21:56:41 +02:00 committed by GitHub
parent 0cc27b993f
commit 32df505897
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -152,7 +152,7 @@ class WasmCompilerConfig extends WebCompilerConfig {
final bool stripSymbols = buildMode == BuildMode.release && stripWasm;
return <String>[
'-O$optimizationLevel',
'--${stripSymbols ? 'no-' : ''}name-section',
'--${stripSymbols ? '' : 'no-'}strip-wasm',
];
}

View File

@ -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,