compileopts: move {root} replacement to compileopts.Emulator()

This commit is contained in:
Damian Gryski
2021-12-31 09:54:40 -08:00
committed by Ron Evans
parent cc1a95a489
commit ca2f25ed48
3 changed files with 37 additions and 30 deletions
-7
View File
@@ -232,13 +232,6 @@ 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
}