build: separate compiler and libs
This commit is contained in:
16
compiler/cl/_testrt/fprintf/in.go
Normal file
16
compiler/cl/_testrt/fprintf/in.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import "unsafe"
|
||||
|
||||
//go:linkname cstr llgo.cstr
|
||||
func cstr(string) *int8
|
||||
|
||||
//go:linkname stderr __stderrp
|
||||
var stderr unsafe.Pointer
|
||||
|
||||
//go:linkname fprintf C.fprintf
|
||||
func fprintf(fp unsafe.Pointer, format *int8, __llgo_va_list ...any)
|
||||
|
||||
func main() {
|
||||
fprintf(stderr, cstr("Hello %d\n"), 100)
|
||||
}
|
||||
Reference in New Issue
Block a user