all: use DWARF version 4

This should hopefully fix the following issue:

    DW_FORM_rnglistx index pointing outside of .debug_rnglists offset array [in module /tmp/tinygo4013272868/main]
This commit is contained in:
Ayke van Laethem
2022-10-28 20:58:24 +02:00
committed by Ron Evans
parent 12a41dc791
commit c0d505d13a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -329,7 +329,7 @@ func (c *Config) CFlags() []string {
panic("unknown libc: " + c.Target.Libc)
}
// Always emit debug information. It is optionally stripped at link time.
cflags = append(cflags, "-g")
cflags = append(cflags, "-gdwarf-4")
// Use the same optimization level as TinyGo.
cflags = append(cflags, "-O"+c.Options.Opt)
// Set the LLVM target triple.