mirror of https://github.com/tinygo-org/tinygo.git
wasmstm32webassemblymicrocontrollerarmavrspiwasiadafruitarduinocircuitplayground-expressgpioi2cllvmmicrobitnrf51nrf52nrf52840samd21tinygo
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
515 B
22 lines
515 B
// +build !byollvm
|
|
|
|
package main
|
|
|
|
// This file provides a Link() function that always runs an external command. It
|
|
// is provided for when tinygo is built without linking to liblld.
|
|
|
|
import (
|
|
"os"
|
|
"os/exec"
|
|
)
|
|
|
|
// Link invokes a linker with the given name and arguments.
|
|
//
|
|
// This version always runs the linker as an external command.
|
|
func Link(dir, linker string, flags ...string) error {
|
|
cmd := exec.Command(linker, flags...)
|
|
cmd.Stdout = os.Stdout
|
|
cmd.Stderr = os.Stderr
|
|
cmd.Dir = dir
|
|
return cmd.Run()
|
|
}
|
|
|