diff options
author | Ayke van Laethem <[email protected]> | 2021-11-11 14:12:38 +0100 |
---|---|---|
committer | Ron Evans <[email protected]> | 2021-11-24 21:09:29 +0100 |
commit | 1789570f52598e96b1d638b9d52910d0278b8f15 (patch) | |
tree | ba2a44866de226ea4b71a1d5045fe1e21da968d4 /cgo/cgo_test.go | |
parent | a536ddcda8025233ad093f5f76d9d728ab67fa3f (diff) | |
download | tinygo-1789570f52598e96b1d638b9d52910d0278b8f15.tar.gz tinygo-1789570f52598e96b1d638b9d52910d0278b8f15.zip |
cgo: add //go: pragmas to generated functions and globals
This patch adds //go: pragmas directly to declared functions and
globals found during CGo processing. This simplifies the logic in the
compiler: it no longer has to consider special "C." prefixed function
names. It also makes the cgo pass more flexible in the pragmas it emits
for functions and global variables.
Diffstat (limited to 'cgo/cgo_test.go')
-rw-r--r-- | cgo/cgo_test.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cgo/cgo_test.go b/cgo/cgo_test.go index a50437120..b46c36dd6 100644 --- a/cgo/cgo_test.go +++ b/cgo/cgo_test.go @@ -30,7 +30,14 @@ func normalizeResult(result string) string { func TestCGo(t *testing.T) { var cflags = []string{"--target=armv6m-unknown-unknown-eabi"} - for _, name := range []string{"basic", "errors", "types", "flags", "const"} { + for _, name := range []string{ + "basic", + "errors", + "types", + "symbols", + "flags", + "const", + } { name := name // avoid a race condition t.Run(name, func(t *testing.T) { // Skip tests that require specific Go version. |