main: use OS specific name for llvm-ar-7 tool to ensure that llvm7 toolchain works as expected

Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
Ron Evans
2019-03-14 19:51:07 +01:00
committed by Ayke van Laethem
parent a466dd8f2b
commit d6c2d6e301
3 changed files with 22 additions and 7 deletions
+11
View File
@@ -0,0 +1,11 @@
// +build !darwin
package main
// commands used by the compilation process might have different file names on Linux than those used on macOS.
var commands = map[string]string{
"ar": "llvm-ar-7",
"clang": "clang-7",
"ld.lld": "ld.lld-7",
"wasm-ld": "wasm-ld-7",
}
+11
View File
@@ -0,0 +1,11 @@
// +build darwin
package main
// commands used by the compilation process might have different file names on macOS than those used on Linux.
var commands = map[string]string{
"ar": "llvm-ar",
"clang": "clang-7",
"ld.lld": "ld.lld-7",
"wasm-ld": "wasm-ld-7",
}
-7
View File
@@ -21,13 +21,6 @@ import (
"github.com/tinygo-org/tinygo/loader"
)
var commands = map[string]string{
"ar": "llvm-ar",
"clang": "clang-7",
"ld.lld": "ld.lld-7",
"wasm-ld": "wasm-ld-7",
}
// commandError is an error type to wrap os/exec.Command errors. This provides
// some more information regarding what went wrong while running a command.
type commandError struct {