diff options
author | Griffin Smith <grfn@gws.fyi> | 2021-03-20T00·46-0400 |
---|---|---|
committer | glittershark <grfn@gws.fyi> | 2021-03-20T20·20+0000 |
commit | 2c838ab845bc54c5ef6cb0561332c84f34249368 (patch) | |
tree | c54c95ebc7f503a1db255566b3e25494bbaa28b3 /users/glittershark/achilles/ach | |
parent | fec6595d211e7e3ea616d8335fe5d143a4a7507d (diff) |
feat(gs/achilles): Implement extern decls, for glibc functions r/2293
Implement extern decls, which codegen to LLVM as forward-declared functions, and use these as a hook into calling glibc functions. We can print to the terminal now! The integration tests can test this now. Change-Id: I70af4546b417b888ad9fbb18798db240f77f4e71 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2614 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'users/glittershark/achilles/ach')
-rw-r--r-- | users/glittershark/achilles/ach/.gitignore | 1 | ||||
-rw-r--r-- | users/glittershark/achilles/ach/externs.ach | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/users/glittershark/achilles/ach/.gitignore b/users/glittershark/achilles/ach/.gitignore index 683a53a01f6c..07b37e168979 100644 --- a/users/glittershark/achilles/ach/.gitignore +++ b/users/glittershark/achilles/ach/.gitignore @@ -3,3 +3,4 @@ functions simple +externs diff --git a/users/glittershark/achilles/ach/externs.ach b/users/glittershark/achilles/ach/externs.ach new file mode 100644 index 000000000000..faf8ce90e353 --- /dev/null +++ b/users/glittershark/achilles/ach/externs.ach @@ -0,0 +1,5 @@ +extern puts : fn cstring -> int + +fn main = + let _ = puts "foobar" + in 0 |