mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-19 03:54:01 +00:00
compileopts,targets: replace '{root}' in target files
This commit is contained in:
@@ -232,6 +232,13 @@ func LoadTarget(options *Options) (*TargetSpec, error) {
|
||||
spec.ExtraFiles = append(spec.ExtraFiles, "src/internal/task/task_asyncify_wasm.S")
|
||||
}
|
||||
|
||||
// TODO(dgryski): handle CFLAGS and LDFLAGS here too?
|
||||
var emu []string
|
||||
for _, s := range spec.Emulator {
|
||||
emu = append(emu, strings.ReplaceAll(s, "{root}", goenv.Get("TINYGOROOT")))
|
||||
}
|
||||
spec.Emulator = emu
|
||||
|
||||
return spec, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user