cgo: support builtin #include headers

Add support for header files bundled with the compiler by copying them
into the release tarball.
This commit is contained in:
Ayke van Laethem
2019-04-20 15:14:48 +02:00
committed by Ron Evans
parent d396abb690
commit 2f2d62cc0c
10 changed files with 49 additions and 18 deletions
+1
View File
@@ -43,6 +43,7 @@ func main() {
println("char match:", C.globalChar == 100)
var voidPtr unsafe.Pointer = C.globalVoidPtrNull
println("void* match:", voidPtr == nil, C.globalVoidPtrNull == nil, (*C.int)(C.globalVoidPtrSet) == &C.global)
println("int64_t match:", C.globalInt64 == C.int64_t(-(2<<40)))
// complex types
println("struct:", C.int(unsafe.Sizeof(C.globalStruct)) == C.globalStructSize, C.globalStruct.s, C.globalStruct.l, C.globalStruct.f)