diff options
author | Matthew Sotoudeh <matthew@masot.net> | 2024-09-02 16:15:03 -0700 |
---|---|---|
committer | Matthew Sotoudeh <matthew@masot.net> | 2024-09-02 16:15:03 -0700 |
commit | 6a1d9613fb6c036dc8d41bfdfeeb6e80ac4f17a8 (patch) | |
tree | 866c0722442c8cc934e1370c6fc060463934b174 /codegen.c | |
parent | c3035ba7d2c2f50c7ab815e88b08edd5c6e92008 (diff) |
compile helper code in
Diffstat (limited to 'codegen.c')
-rw-r--r-- | codegen.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -912,6 +912,11 @@ static void emit_text(Obj *prog) { } } +static char DIETC_HELPERS_H[] = { +#include "scripts/dietc_helpers.h.bytes" + , 0x00 +}; + void codegen(Obj *prog, FILE *out) { TYPE_BUFFER = tmpfile(); MAIN_BUFFER = tmpfile(); @@ -924,7 +929,7 @@ void codegen(Obj *prog, FILE *out) { emit_text(prog); pop_buffer(MAIN_BUFFER); - fprintf(out, "#include \"%s/scripts/dietc_helpers.h\"\n", DIETC_ROOT); + fprintf(out, "%s\n", DIETC_HELPERS_H); flush_buffer(out, TYPE_BUFFER); flush_buffer(out, MAIN_BUFFER); } |