gc: drop support for 'precise' globals

Precise globals require a whole program optimization pass that is hard
to support when building packages separately. This patch removes support
for these globals by converting the last use (Linux) to use
linker-defined symbols instead.

For details, see: https://github.com/tinygo-org/tinygo/issues/2870
This commit is contained in:
Ayke van Laethem
2022-05-30 13:47:09 +02:00
committed by Ron Evans
parent 5c488e3145
commit 2d61972475
9 changed files with 39 additions and 244 deletions
+11
View File
@@ -0,0 +1,11 @@
//go:build linux && (baremetal || nintendoswitch || wasi)
// +build linux
// +build baremetal nintendoswitch wasi
// Other systems that aren't operating systems supported by the Go toolchain
// need to pretend to be an existing operating system. Linux seems like a good
// choice for this for its wide hardware support.
package runtime
const GOOS = "linux"