diff options
author | Ayke van Laethem <[email protected]> | 2019-04-24 20:30:12 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2019-04-25 10:48:56 +0200 |
commit | d396abb6907b07b6a66129c1cf12d55a1ffce976 (patch) | |
tree | 68b3786cc0ae9ccab08bb43816076bd094b7fd02 /loader | |
parent | b815d3f7609ebbda502a611e4be77a5f5da019ae (diff) | |
download | tinygo-d396abb6907b07b6a66129c1cf12d55a1ffce976.tar.gz tinygo-d396abb6907b07b6a66129c1cf12d55a1ffce976.zip |
cgo: add dummy implementation of __builtin_va_list
Every ABI has a slightly different implementation. Ideally, we would use
something like Clang TargetInfo or extract it by compiling some C code
and checking the IR, but this is a useful workaround for now.
Diffstat (limited to 'loader')
-rw-r--r-- | loader/cgo.go | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/loader/cgo.go b/loader/cgo.go index 8cabce7d2..46823c26f 100644 --- a/loader/cgo.go +++ b/loader/cgo.go @@ -51,15 +51,16 @@ type globalInfo struct { // cgoAliases list type aliases between Go and C, for types that are equivalent // in both languages. See addTypeAliases. var cgoAliases = map[string]string{ - "C.int8_t": "int8", - "C.int16_t": "int16", - "C.int32_t": "int32", - "C.int64_t": "int64", - "C.uint8_t": "uint8", - "C.uint16_t": "uint16", - "C.uint32_t": "uint32", - "C.uint64_t": "uint64", - "C.uintptr_t": "uintptr", + "C.int8_t": "int8", + "C.int16_t": "int16", + "C.int32_t": "int32", + "C.int64_t": "int64", + "C.uint8_t": "uint8", + "C.uint16_t": "uint16", + "C.uint32_t": "uint32", + "C.uint64_t": "uint64", + "C.uintptr_t": "uintptr", + "C.__builtin_va_list": "uintptr", // dummy value until fully implemented } // cgoTypes lists some C types with ambiguous sizes that must be retrieved |