mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 11:37:46 +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
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -13,6 +13,6 @@
|
||||
"--stack-first",
|
||||
"--no-demangle"
|
||||
],
|
||||
"emulator": ["node", "targets/wasm_exec.js"],
|
||||
"emulator": ["node", "{root}/targets/wasm_exec.js"],
|
||||
"wasm-abi": "js"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user