mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 11:07:46 +00:00
main: set the current working directory when calling an external linker
In particular, while LLVM lld supports -L for linker scripts imported with the `INCLUDE` command, GNU ld does not seem to support this. This is a prerequisite for supporting the HiFive1 board in the TinyGo Playground.
This commit is contained in:
committed by
Ron Evans
parent
b0cad7ed63
commit
66d8899aa7
@@ -63,6 +63,7 @@ func Link(linker string, flags ...string) error {
|
||||
cmd := exec.Command(linker, flags...)
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
cmd.Dir = sourceDir()
|
||||
return cmd.Run()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,5 +20,6 @@ func Link(linker string, flags ...string) error {
|
||||
cmd := exec.Command(linker, flags...)
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
cmd.Dir = sourceDir()
|
||||
return cmd.Run()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user