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>
Этот коммит содержится в:
родитель
a466dd8f2b
коммит
d6c2d6e301
3 изменённых файлов: 22 добавлений и 7 удалений
11
commands.go
Обычный файл
11
commands.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",
|
||||
}
|
11
commands_macos.go
Обычный файл
11
commands_macos.go
Обычный файл
|
@ -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
main.go
7
main.go
|
@ -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 {
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче