targets/wasm_unknown: use proper defaults for GC
Signed-off-by: deadprogram <ron@hybridgroup.com>
Этот коммит содержится в:
родитель
e9ca41735a
коммит
ad30085b93
3 изменённых файлов: 5 добавлений и 3 удалений
|
@ -773,7 +773,7 @@ endif
|
||||||
ifneq ($(WASM), 0)
|
ifneq ($(WASM), 0)
|
||||||
$(TINYGO) build -size short -o wasm.wasm -target=wasm examples/wasm/export
|
$(TINYGO) build -size short -o wasm.wasm -target=wasm examples/wasm/export
|
||||||
$(TINYGO) build -size short -o wasm.wasm -target=wasm examples/wasm/main
|
$(TINYGO) build -size short -o wasm.wasm -target=wasm examples/wasm/main
|
||||||
$(TINYGO) build -size short -o wasm.wasm -target=wasm-unknown -gc=leaking -no-debug examples/hello-wasm-unknown
|
$(TINYGO) build -size short -o wasm.wasm -target=wasm-unknown examples/hello-wasm-unknown
|
||||||
endif
|
endif
|
||||||
# test various compiler flags
|
# test various compiler flags
|
||||||
$(TINYGO) build -size short -o test.hex -target=pca10040 -gc=none -scheduler=none examples/blinky1
|
$(TINYGO) build -size short -o test.hex -target=pca10040 -gc=none -scheduler=none examples/blinky1
|
||||||
|
|
|
@ -16,7 +16,7 @@ func _start() {
|
||||||
// These need to be initialized early so that the heap can be initialized.
|
// These need to be initialized early so that the heap can be initialized.
|
||||||
heapStart = uintptr(unsafe.Pointer(&heapStartSymbol))
|
heapStart = uintptr(unsafe.Pointer(&heapStartSymbol))
|
||||||
heapEnd = uintptr(wasm_memory_size(0) * wasmPageSize)
|
heapEnd = uintptr(wasm_memory_size(0) * wasmPageSize)
|
||||||
run()
|
initAll()
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
{
|
{
|
||||||
"llvm-target": "wasm32-unknown-unknown",
|
"llvm-target": "wasm32-unknown-unknown",
|
||||||
"cpu": "generic",
|
"cpu": "generic",
|
||||||
"features": "+mutable-globals,+nontrapping-fptoint,+sign-ext",
|
"features": "+mutable-globals,+nontrapping-fptoint,+sign-ext,-bulk-memory",
|
||||||
"build-tags": ["tinygo.wasm", "wasm_unknown"],
|
"build-tags": ["tinygo.wasm", "wasm_unknown"],
|
||||||
"goos": "linux",
|
"goos": "linux",
|
||||||
"goarch": "arm",
|
"goarch": "arm",
|
||||||
"linker": "wasm-ld",
|
"linker": "wasm-ld",
|
||||||
"rtlib": "compiler-rt",
|
"rtlib": "compiler-rt",
|
||||||
"scheduler": "none",
|
"scheduler": "none",
|
||||||
|
"gc": "leaking",
|
||||||
"default-stack-size": 4096,
|
"default-stack-size": 4096,
|
||||||
"cflags": [
|
"cflags": [
|
||||||
"-mno-bulk-memory",
|
"-mno-bulk-memory",
|
||||||
|
@ -15,6 +16,7 @@
|
||||||
"-msign-ext"
|
"-msign-ext"
|
||||||
],
|
],
|
||||||
"ldflags": [
|
"ldflags": [
|
||||||
|
"--stack-first",
|
||||||
"--no-demangle",
|
"--no-demangle",
|
||||||
"--no-entry",
|
"--no-entry",
|
||||||
"--import-memory"
|
"--import-memory"
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче