This simplifies adding more baremetal targets, like a GameBoy Advance,
or baremetal x86 for unikernels.
Этот коммит содержится в:
Ayke van Laethem 2019-07-31 20:32:18 +02:00 коммит произвёл Ron Evans
родитель f76385850d
коммит 54169c714f
19 изменённых файлов: 19 добавлений и 19 удалений

Просмотреть файл

@ -226,7 +226,7 @@ func (c *Compiler) Compile(mainPath string) []error {
return path
} else if path == "syscall" {
for _, tag := range c.BuildTags {
if tag == "avr" || tag == "cortexm" || tag == "darwin" || tag == "riscv" {
if tag == "baremetal" || tag == "darwin" {
return path
}
}

Просмотреть файл

@ -18,7 +18,7 @@ func (c *Compiler) needsStackObjects() bool {
return false
}
for _, tag := range c.BuildTags {
if tag == "cortexm" || tag == "tinygo.riscv" {
if tag == "baremetal" {
return false
}
}

Просмотреть файл

@ -1,4 +1,4 @@
// +build !stm32f4disco,!hifive1b
// +build avr nrf sam stm32,!stm32f4disco
package machine

Просмотреть файл

@ -1,4 +1,4 @@
// +build !avr,!nrf,!sam,!sifive,!stm32
// +build !baremetal
package machine

Просмотреть файл

@ -1,4 +1,4 @@
// +build !stm32f407,!avr,!hifive1b
// +build nrf sam stm32,!stm32f407
package machine

Просмотреть файл

@ -1,4 +1,4 @@
// +build avr cortexm tinygo.riscv wasm
// +build baremetal wasm
package os

Просмотреть файл

@ -1,4 +1,4 @@
// +build darwin linux,!avr,!cortexm,!tinygo.riscv
// +build darwin linux,!baremetal
package os

Просмотреть файл

@ -1,4 +1,4 @@
// +build arm,!avr,!cortexm,!tinygo.riscv
// +build arm,!baremetal
package runtime

Просмотреть файл

@ -1,4 +1,4 @@
// +build avr cortexm tinygo.riscv
// +build baremetal
package runtime

Просмотреть файл

@ -1,5 +1,5 @@
// +build gc.conservative
// +build cortexm tinygo.riscv
// +build baremetal
package runtime

Просмотреть файл

@ -1,5 +1,5 @@
// +build gc.conservative
// +build !cortexm,!tinygo.riscv
// +build !baremetal
package runtime

Просмотреть файл

@ -1,5 +1,5 @@
// +build gc.conservative
// +build !cortexm,!tinygo.riscv
// +build !baremetal
package runtime

Просмотреть файл

@ -1,5 +1,5 @@
// +build gc.conservative
// +build cortexm tinygo.riscv
// +build baremetal
package runtime

Просмотреть файл

@ -1,4 +1,4 @@
// +build darwin linux,!avr,!cortexm,!tinygo.riscv
// +build darwin linux,!baremetal
package runtime

Просмотреть файл

@ -1,4 +1,4 @@
// +build avr cortexm
// +build baremetal
package syscall

Просмотреть файл

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build avr cortexm
// +build baremetal
package syscall

Просмотреть файл

@ -1,5 +1,5 @@
{
"build-tags": ["avr", "linux", "arm"],
"build-tags": ["avr", "baremetal", "linux", "arm"],
"goos": "linux",
"goarch": "arm",
"compiler": "avr-gcc",

Просмотреть файл

@ -1,5 +1,5 @@
{
"build-tags": ["cortexm", "linux", "arm"],
"build-tags": ["cortexm", "baremetal", "linux", "arm"],
"goos": "linux",
"goarch": "arm",
"compiler": "clang",

Просмотреть файл

@ -2,7 +2,7 @@
"llvm-target": "riscv32--none",
"goos": "linux",
"goarch": "arm",
"build-tags": ["tinygo.riscv", "linux", "arm"],
"build-tags": ["tinygo.riscv", "baremetal", "linux", "arm"],
"gc": "conservative",
"compiler": "riscv64-unknown-elf-gcc",
"linker": "riscv64-unknown-elf-ld",