mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
builder: fix wasi-libc path names on Windows with -size=full
Without this fix, wasi-libc is listed as follows:
65 0 0 0 | 65 0 | C:\Users\Ayke\src\tinygo\tinygo\lib\wasi-libc\libc-bottom-half\sources
14 0 0 0 | 14 0 | C:\Users\Ayke\src\tinygo\tinygo\lib\wasi-libc\libc-top-half\musl\src\exit
1398 0 0 0 | 1398 0 | C:\Users\Ayke\src\tinygo\tinygo\lib\wasi-libc\libc-top-half\musl\src\string
1525 0 0 0 | 1525 0 | C:\Users\Ayke\src\tinygo\tinygo\lib\wasi-libc\libc-top-half\sources
With this fix, it's identified as the wasi-libc C library:
3002 0 0 0 | 3002 0 | C wasi-libc
This commit is contained in:
committed by
Ron Evans
parent
b76ea29520
commit
ca80c52df1
@@ -200,6 +200,11 @@ func readProgramSizeFromDWARF(data *dwarf.Data, codeOffset, codeAlignment uint64
|
||||
// Work around a Clang bug on Windows:
|
||||
// https://github.com/llvm/llvm-project/issues/117317
|
||||
path = strings.ReplaceAll(path, "\\\\", "\\")
|
||||
|
||||
// wasi-libc likes to use forward slashes, but we
|
||||
// canonicalize everything to use backwards slashes as
|
||||
// is common on Windows.
|
||||
path = strings.ReplaceAll(path, "/", "\\")
|
||||
}
|
||||
line := addressLine{
|
||||
Address: prevLineEntry.Address + codeOffset,
|
||||
|
||||
Reference in New Issue
Block a user