diff options
author | Ayke van Laethem <[email protected]> | 2022-10-28 20:58:24 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2022-10-31 09:59:32 +0100 |
commit | c0d505d13aad7cdbf0cf96edba44765173488ef8 (patch) | |
tree | b94cf1dd58542d59c60b296d069a18fbca63eeb8 /builder/library.go | |
parent | 12a41dc791d9d8078fbd405d5cd1bec69e1dc506 (diff) | |
download | tinygo-c0d505d13aad7cdbf0cf96edba44765173488ef8.tar.gz tinygo-c0d505d13aad7cdbf0cf96edba44765173488ef8.zip |
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]
Diffstat (limited to 'builder/library.go')
-rw-r--r-- | builder/library.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builder/library.go b/builder/library.go index 23d938823..8725c3014 100644 --- a/builder/library.go +++ b/builder/library.go @@ -142,7 +142,7 @@ func (l *Library) load(config *compileopts.Config, tmpdir string) (job *compileJ // Note: -fdebug-prefix-map is necessary to make the output archive // reproducible. Otherwise the temporary directory is stored in the archive // itself, which varies each run. - args := append(l.cflags(target, headerPath), "-c", "-Oz", "-g", "-ffunction-sections", "-fdata-sections", "-Wno-macro-redefined", "--target="+target, "-fdebug-prefix-map="+dir+"="+remapDir) + args := append(l.cflags(target, headerPath), "-c", "-Oz", "-gdwarf-4", "-ffunction-sections", "-fdata-sections", "-Wno-macro-redefined", "--target="+target, "-fdebug-prefix-map="+dir+"="+remapDir) cpu := config.CPU() if cpu != "" { // X86 has deprecated the -mcpu flag, so we need to use -march instead. |