Skip to content
Permalink
Browse files

main: use OS specific name for llvm-ar-7 tool to ensure that llvm7 to…

…olchain works as expected

Signed-off-by: Ron Evans <ron@hybridgroup.com>
  • Loading branch information...
deadprogram authored and aykevl committed Mar 14, 2019
1 parent a466dd8 commit d6c2d6e3017e88356d1875cd905685fb606b4878
Showing with 22 additions and 7 deletions.
  1. +11 −0 commands.go
  2. +11 −0 commands_macos.go
  3. +0 −7 main.go
@@ -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",
}
@@ -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",
}
@@ -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 {

0 comments on commit d6c2d6e

Please sign in to comment.
You can’t perform that action at this time.