mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 13:33:39 +00:00
main: add -internal-nodwarf flag
This can be useful during development to avoid generating debug information in IR.
This commit is contained in:
committed by
Ron Evans
parent
92d9f856ab
commit
4a240827cb
@@ -1431,6 +1431,12 @@ func main() {
|
||||
printIR := flag.Bool("internal-printir", false, "print LLVM IR")
|
||||
dumpSSA := flag.Bool("internal-dumpssa", false, "dump internal Go SSA")
|
||||
verifyIR := flag.Bool("internal-verifyir", false, "run extra verification steps on LLVM IR")
|
||||
// Don't generate debug information in the IR, to make IR more readable.
|
||||
// You generally want debug information in IR for various features, like
|
||||
// stack size calculation and features like -size=short, -print-allocs=,
|
||||
// etc. The -no-debug flag is used to strip it at link time. But for TinyGo
|
||||
// development it can be useful to not emit debug information at all.
|
||||
skipDwarf := flag.Bool("internal-nodwarf", false, "internal flag, use -no-debug instead")
|
||||
|
||||
var flagJSON, flagDeps, flagTest bool
|
||||
if command == "help" || command == "list" || command == "info" || command == "build" {
|
||||
@@ -1508,6 +1514,7 @@ func main() {
|
||||
PrintIR: *printIR,
|
||||
DumpSSA: *dumpSSA,
|
||||
VerifyIR: *verifyIR,
|
||||
SkipDWARF: *skipDwarf,
|
||||
Semaphore: make(chan struct{}, *parallelism),
|
||||
Debug: !*nodebug,
|
||||
PrintSizes: *printSize,
|
||||
|
||||
Reference in New Issue
Block a user