aboutsummaryrefslogtreecommitdiffhomepage
path: root/builder
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2024-11-20 09:00:05 +0100
committerRon Evans <[email protected]>2024-11-26 12:41:12 +0100
commit9172cc15d2f0d5bd125925fa56d1b173b31fb552 (patch)
treed1d64cf3e4ced0efb1c33cc59b4035945f8b9c16 /builder
parent1b83d43cfa62f5c11872770fec12e7948e2a2ebb (diff)
downloadtinygo-9172cc15d2f0d5bd125925fa56d1b173b31fb552.tar.gz
tinygo-9172cc15d2f0d5bd125925fa56d1b173b31fb552.zip
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).
Diffstat (limited to 'builder')
-rw-r--r--builder/build.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/builder/build.go b/builder/build.go
index 4c49fe13c..64a1fde61 100644
--- a/builder/build.go
+++ b/builder/build.go
@@ -690,7 +690,7 @@ func Build(pkgName, outpath, tmpdir string, config *compileopts.Config) (BuildRe
for _, pkg := range lprogram.Sorted() {
pkg := pkg
for _, filename := range pkg.CFiles {
- abspath := filepath.Join(pkg.Dir, filename)
+ abspath := filepath.Join(pkg.OriginalDir(), filename)
job := &compileJob{
description: "compile CGo file " + abspath,
run: func(job *compileJob) error {