main: add -debug flag that controls debuginfo stripping

Debug information is useful in many case, but in the case of WebAssembly
it increases the binary size by a large amount. It also inhibits
compression of relocations. Therefore I've made debug information
optional and disabled by default.

(Debug information is still generated, but stripped from the binary at
the link step).
This commit is contained in:
Ayke van Laethem
2021-07-11 15:12:46 +02:00
parent 0565b7c0e0
commit 2930c44bfc
5 changed files with 77 additions and 9 deletions
+1 -1
View File
@@ -194,7 +194,7 @@ func runTest(name, target string, t *testing.T, cmdArgs, environmentVars []strin
PrintIR: false,
DumpSSA: false,
VerifyIR: true,
Debug: true,
EmitDWARF: true,
PrintSizes: "",
WasmAbi: "",
}