aboutsummaryrefslogtreecommitdiffhomepage
path: root/go.sum
AgeCommit message (Collapse)Author
2024-10-04wasm: add `//go:wasmexport` support (#4451)Ayke
This adds support for the `//go:wasmexport` pragma as proposed here: https://github.com/golang/go/issues/65199 It is currently implemented only for wasip1 and wasm-unknown, but it is certainly possible to extend it to other targets like GOOS=js and wasip2.
2024-08-12GNUmakefile: add spellfix target, use it. (#4387)dkegel-fastly
TODO: Remove the go.mod/go.sum in internal/tools once doing so doesn't break CI (e.g. once we drop support for go 1.19) * builder/cc1as.h: fix typo found by 'make spell' * GNUmakefile: remove exception for inbetween, fix instance now found by 'make spell' * GNUmakefile: remove exception for programmmer, fix instance now found by 'make spell' * go.mod: use updated misspell. GNUmakefile: add spellfix target, use it. * ignore directories properly when invoking spellchecker. * make spell: give internal/tools its own go.mod, as misspell requires newer go * make lint: depend on tools and run the installed revive (which was perhaps implied by the change that added revive to internal/tools, but not required in GNUmakefile until we gave internal/tools its own temporary go.mod) * .github: now that 'make spell' works well, run it from CI * GNUmakefile: make spell now aborts if it finds misspelt words, so what it finds doesn't get lost in CI logs * GNUmakefile: tools: avoid -C option on go generate to make test-llvm15-go119 circleci job happy, see https://cs.opensource.google/go/go/+/2af48cbb7d85e5fdc635e75b99f949010c607786 * internal/tools/go.mod: fix format of go version to leave out patchlevel, else go complains.
2024-07-03transform: fix incorrect alignment of heap-to-stack transformAyke van Laethem
It assumed the maximum alignment was equal to sizeof(void*), which is definitely not the case. So this only worked more or less by accident previously. It now uses the alignment as specified by the frontend, or else `unsafe.Alignof(complex128)` which is typically the maximum alignment of a given platform (though this shouldn't really happen in practice: the optimizer should keep the 'align' attribute in place).
2024-06-23all: use latest version of x/toolsAyke van Laethem
We previously picked a work-in-progress patch, but this is the proper fix for this race condition. I think we should use that instead of relying on the previous work-in-progress patch.
2024-06-12compiler: fix race condition by applying a proposed patchAyke van Laethem
This commit switches to v0.22.0 of golang.org/x/tools and then applies https://go-review.googlesource.com/c/tools/+/590815 to fix the race condition. In my testing, it seems to fix these issues.
2024-05-24LLVM 18 supportAyke van Laethem
2024-04-30Add 'make spell' target, fix what it finds. In .go files, only checks comments.Dan Kegel
2024-04-13lint: add "make lint" target, run it from ciDan Kegel
See https://github.com/tinygo-org/tinygo/issues/4225 Runs in both circleci and github, circleci is run on branch push, github is run on PR Revive builds so fast, don't bother installing it; saves us wondering which one we get Uses tools.go idiom to give control over linter versions to go.mod. Also pacifies linter re AppendToGlobal as a token first fix. TODO: gradually expand the number of directories that are linted, uncomment more entries in revive.toml, and fix or suppress the warnings lint finds. TODO: add linters "go vet" and staticcheck NOT TODO: don't add metalinters like golangci-lint that pull in lots of new of dependencies; we'd rather not clutter go.mod that much, let alone open ourselves up to the additional attack surface.
2024-03-19wasm: fix symbol table index for archivesAyke van Laethem
The symbol table was generated incorrectly. The correct way is to use the custom linking WebAssembly section, which I implemented in go-wasm for this purpose. This fixes https://github.com/tinygo-org/tinygo/issues/4114 and is a prerequisite for https://github.com/tinygo-org/tinygo/pull/4176.
2024-01-20all: switch to LLVM 17 by defaultAyke van Laethem
2024-01-18compiler: update golang.org/x/tools/go/ssa packageAyke van Laethem
This update includes support for the new range loops over integers.
2023-10-15all: fix a small incompatibility with NixAyke van Laethem
Hopefully this won't break anybody: while all tests still pass, there could in theory be systems where not supplying those libraries leads to linker errors.
2023-10-06all: add initial LLVM 17 supportAyke van Laethem
This allows us to test and use LLVM 17, now that it is available in Homebrew. Full support for LLVM 17 (including using it by default) will have to wait until Espressif rebases their Xtensa fork of LLVM.
2023-09-22interp: print LLVM instruction in tracebackAyke van Laethem
The old traceback would look like this: # internal/godebug /usr/local/go/src/internal/godebug/godebug.go:101:11: interp: test call <2> 0 <3> 0 traceback: /usr/local/go/src/internal/godebug/godebug.go:101:11: call <2> 0 <3> 0 /usr/local/go/src/internal/godebug: call <1> 0 With this patch, it looks like this: # io/fs /usr/local/go/src/io/fs/fs.go:144:45: interp: test %0 = load %runtime._interface, ptr @"internal/oserror.ErrInvalid", align 8, !dbg !316 traceback: /usr/local/go/src/io/fs/fs.go:144:45: %0 = load %runtime._interface, ptr @"internal/oserror.ErrInvalid", align 8, !dbg !316 /usr/local/go/src/io/fs/fs.go:137:28: %0 = call %runtime._interface @"io/fs.errInvalid"(ptr undef), !dbg !317 For developers (like me) who are familiar with LLVM, this is probably easier to read. For users, I'm not sure: the instructions have quite a lot of distracting fluff in them. But at least it contains the function names that are called (which are not currently present in the old traceback). ...that said, having the LLVM instructions in a bug report is probably going to be easier for people who are familar with LLVM.
2023-09-18all: default to LLVM 16Ayke van Laethem
So that `go install` works on MacOS with Homebrew (and on Linux with an up-to-date distro).
2023-09-18all: switch to LLVM 16Ayke van Laethem
This commit adds support for LLVM 16 and switches to it by default. That means three LLVM versions are supported at the same time: LLVM 14, 15, and 16. This commit includes work by QuLogic: * Part of this work was based on a PR by QuLogic: https://github.com/tinygo-org/tinygo/pull/3649 But I also had parts of this already implemented in an old branch I already made for LLVM 16. * QuLogic also provided a CGo fix here, which is also incorporated in this commit: https://github.com/tinygo-org/tinygo/pull/3869 The difference with the original PR by QuLogic is that this commit is more complete: * It switches to LLVM 16 by default. * It updates some things to also make it work with a self-built LLVM. * It fixes the CGo bug in a slightly different way, and also fixes another one not included in the original PR. * It does not keep compiler tests passing on older LLVM versions. I have found this to be quite burdensome and therefore don't generally do this - the smoke tests should hopefully catch most regressions.
2023-09-10Update golang.org/x/tools to v0.12.0Elliott Sales de Andrade
2023-09-10Update tools to 0.9.0Elliott Sales de Andrade
This requires updating test data, due to the change noted in the previous commit.
2023-08-11modules: update to go-serial package v1.6.0deadprogram
Signed-off-by: deadprogram <[email protected]>
2023-08-04all: Go 1.21 supportAyke van Laethem
2023-05-13builder: implement Nordic DFU file writer in GoAyke van Laethem
This avoids a dependency on nrfutil. I have verified that it creates equivalent zip files to a wasp-os DFU zip file I downloaded here: https://github.com/wasp-os/wasp-os/releases/ I have also tested that it produces valid DFU files that can be uploaded using the dfu.py program here to my PineTime: https://github.com/wasp-os/ota-dfu-python/tree/3d6fd30d33c2b20bc86ff6b9269fddf4a1d4c7c6 There are some minor differences in the generated file that should not matter in practice (JSON whitespace, firmware file name, zip compression).
2023-02-07all: update x/tools/go/ssa to include slice-to-array bugfixAyke van Laethem
For the bugfix, see: https://github.com/golang/go/issues/57790
2023-01-14compiler: update golang.org/x/tools/ssaAyke van Laethem
This package needs to be updated to support Go 1.20. There were a few backwards incompatible changes that required updates to the compiler package.
2022-10-31all: remove libffi warning on macosAyke van Laethem
Running `go install` on MacOS produces the following warning: # github.com/tinygo-org/tinygo ld: warning: directory not found for option '-L/opt/homebrew/opt/libffi/lib' It doesn't look like libffi is used anywhere, so I simply removed it. Not sure why it was included in the first place. (I updated the Makefile for consistency, but we really should be removing that Makefile especially because the Go bindings are removed in upstream LLVM).
2022-10-19ci: add support for LLVM 15Ayke van Laethem
This commit switches to LLVM 15 everywhere by default, while still keeping LLVM 14 support.
2022-10-19interp: change object.llvmType to the initializer typeAyke van Laethem
Previously it was a pointer type, which won't work with opaque pointers. Instead, use the global initializer type instead.
2022-10-19all: add type parameter to *GEP callsAyke van Laethem
This is necessary for LLVM 15.
2022-10-19all: add type parameter to CreateLoadAyke van Laethem
This is needed for LLVM 15.
2022-10-19all: add type parameter to CreateCallAyke van Laethem
This uses LLVMBuildCall2 in the background, which is the replacement for the deprecated LLVMBuildCall function.
2022-09-19go mod tidyAyke van Laethem
2022-09-16main: add serial port monitoring functionalitysago35
Co-authored-by: Ayke <[email protected]>
2022-09-15all: add flag for setting the goroutine stack sizeAyke van Laethem
This is helpful in some cases where the default stack size isn't big enough.
2022-09-15go mod tidyAyke van Laethem
2022-09-01flash: update serial package to v1.3.5 for latest bugfixesdeadprogram
Signed-off-by: deadprogram <[email protected]>
2022-08-30all: drop support for Go 1.16 and Go 1.17Ayke van Laethem
2022-08-04all: remove support for LLVM 13Ayke van Laethem
2022-06-28all: use LLVM 14 by defaultAyke van Laethem
This also adds support for LLVM 14 from Homebrew on MacOS.
2022-06-21wasm: update wasi-libc versionAyke van Laethem
This is necessary for the next commit. It also results in a nice wasm binary size saving of around 300 bytes.
2022-06-11compiler: add support for type parameters (aka generics)Ayke van Laethem
...that was surprisingly easy.
2022-04-23all: update to LLVM 14Ayke van Laethem
Switch over to LLVM 14 for static builds. Keep using LLVM 13 for regular builds for now. This uses a branch of the upstream Espressif branch to fix an issue, see: https://github.com/espressif/llvm-project/pull/59
2022-03-12all: add support for ThinLTOAyke van Laethem
ThinLTO optimizes across LLVM modules at link time. This means that optimizations (such as inlining and const-propagation) are possible between C and Go. This makes this change especially useful for CGo, but not just for CGo. By doing some optimizations at link time, the linker can discard some unused functions and this leads to a size reduction on average. It does increase code size in some cases, but that's true for most optimizations. I've excluded a number of targets for now (wasm, avr, xtensa, windows, macos). They can probably be supported with some more work, but that should be done in separate PRs. Overall, this change results in an average 3.24% size reduction over all the tinygo.org/x/drivers smoke tests. TODO: this commit runs part of the pass pipeline twice. We should set the PrepareForThinLTO flag in the PassManagerBuilder for even further reduced code size (0.7%) and improved compilation speed.
2022-01-23main (test): integrate test corpus runnerNia Waldvogel
This allows us to test a large corpus of external packages against the compiler.
2022-01-23Switch default to llvm13Federico G. Schwindt
2022-01-20Bump go-llvm to support llvm12 and 13 under macosFederico G. Schwindt
2022-01-16testL update chromedp to v0.7.6 for stabilitydeadprogram
Signed-off-by: deadprogram <[email protected]>
2022-01-11Run go mod tidyElliott Sales de Andrade
2022-01-09all: switch to LLVM 13Ayke van Laethem
This adds support for building with `-tags=llvm13` and switches to LLVM 13 for tinygo binaries that are statically linked against LLVM. Some notes on this commit: * Added `-mfloat-abi=soft` to all Cortex-M targets because otherwise nrfx would complain that floating point was enabled on Cortex-M0. That's not the case, but with `-mfloat-abi=soft` the `__SOFTFP__` macro is defined which silences this warning. See: https://reviews.llvm.org/D100372 * Changed from `--sysroot=<root>` to `-nostdlib -isystem <root>` for musl because with Clang 13, even with `--sysroot` some system libraries are used which we don't want. * Changed all `-Xclang -internal-isystem -Xclang` to simply `-isystem`, for consistency with the above change. It appears to have the same effect. * Moved WebAssembly function declarations to the top of the file in task_asyncify_wasm.S because (apparently) the assembler has become more strict.
2021-12-29all: go-llvm that defaults to llvm-12Kenneth Bell
2021-12-23builder: use flock to avoid double-compilesNia Waldvogel
This change uses flock (when available) to acquire locks for build operations. This allows multiple tinygo processes to run concurrently without building the same thing twice.
2021-11-30all: add LLVM 12 supportAyke van Laethem
Originally based on a PR by @QuLogic, but extended a lot to get all tests to pass.