Skip to content

Commit 9172cc1

Browse files
aykevldeadprogram
authored andcommitted
builder: fix cache paths in -size=full output
This fixes long paths from the TinyGo cached GOROOT, as can be seen here: code rodata data bss | flash ram | package ------------------------------- | --------------- | ------- 0 5 0 5 | 5 5 | (padding) 148 0 0 5 | 148 5 | (unknown) 76 0 0 0 | 76 0 | /home/ayke/.cache/tinygo/goroot-ce8827882be9dc201bed279a631881177ae124ea064510684a3cf4bb66436e1a/src/device/arm 4 0 0 0 | 4 0 | /home/ayke/.cache/tinygo/goroot-ce8827882be9dc201bed279a631881177ae124ea064510684a3cf4bb66436e1a/src/internal/task They're now attributed to the correct package instead (device/arm and internal/task).
1 parent 1b83d43 commit 9172cc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builder/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ func Build(pkgName, outpath, tmpdir string, config *compileopts.Config) (BuildRe
690690
for _, pkg := range lprogram.Sorted() {
691691
pkg := pkg
692692
for _, filename := range pkg.CFiles {
693-
abspath := filepath.Join(pkg.Dir, filename)
693+
abspath := filepath.Join(pkg.OriginalDir(), filename)
694694
job := &compileJob{
695695
description: "compile CGo file " + abspath,
696696
run: func(job *compileJob) error {

0 commit comments

Comments
 (0)