zetzit / zz

πŸΊπŸ™ ZetZ a zymbolic verifier and tranzpiler to bare metal C
MIT License
1.6k stars 52 forks source link

semi-amalgam cobjects #102

Closed aep closed 4 years ago

aep commented 4 years ago

external C objects with include paths are unsupported by golang. that's why this change parses all includes and moves everything relative to a single directory.

this is good enough for me, but may need improvement for other use cases, for example we can't emit a true amalgam (yet?!), because that would require parsing all the ifdefs. Its unclear if thats even possible without resolving the system specific ones like #if _WIN32

jwerle commented 4 years ago

what are the details with this one?

aep commented 4 years ago

github somehow pulled in an already commited change, so the overview is missing this commit message

https://github.com/zetzit/zz/pull/102/commits/9e5a43c330f265412292686ffc71c770318b0f1b

aep commented 4 years ago

actually looks like history isnt linear, thats why github did that. going to fix tomorrow.

anyway the change mostly takes in all the stuff in cobjects= [] , parses all the #include directives and makes them relative to target/c/ so that you can just do gcc *.c instead of passing all the stuff in cincludes=[].

makes exporting it to golang possible and also other stuff easier.