tinygo/cgo
Ayke van Laethem e02727679f builder, cgo: support function definitions in CGo headers
For example, the following did not work before but does work with this
change:

    // int add(int a, int b) {
    //   return a + b;
    // }
    import "C"

    func main() {
        println("add:", C.add(3, 5))
    }

Even better, the functions in the header are compiled together with the
rest of the Go code and so they can be optimized together! Currently,
inlining is not yet allowed but const-propagation across functions
works. This should be improved in the future.
2021-09-28 18:44:11 +02:00
..
testdata cgo: fix line/column reporting in syntax error messages 2021-09-28 18:44:11 +02:00
cgo.go builder, cgo: support function definitions in CGo headers 2021-09-28 18:44:11 +02:00
cgo_test.go builder, cgo: support function definitions in CGo headers 2021-09-28 18:44:11 +02:00
const.go cgo: implement prefix parsing 2021-05-21 17:54:13 +02:00
const_test.go cgo: implement prefix parsing 2021-05-21 17:54:13 +02:00
libclang.go cgo: fix line/column reporting in syntax error messages 2021-09-28 18:44:11 +02:00
libclang_config.go all: remove support for LLVM 9 2021-03-04 15:46:05 +01:00
libclang_config_llvm10.go main: use LLVM 11 by default when linking LLVM dynamically 2021-01-19 08:55:57 +01:00
libclang_stubs.c main: switch to LLVM 10 2020-04-09 20:23:51 +02:00
security.go cgo: implement #cgo CFLAGS 2019-11-25 09:32:03 +01:00
security_test.go cgo: implement #cgo CFLAGS 2019-11-25 09:32:03 +01:00
sync.go cgo: refactor; support multiple cgo files in a single package 2019-05-12 10:49:15 +02:00