From 6a1d9613fb6c036dc8d41bfdfeeb6e80ac4f17a8 Mon Sep 17 00:00:00 2001 From: Matthew Sotoudeh Date: Mon, 2 Sep 2024 16:15:03 -0700 Subject: compile helper code in --- codegen.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'codegen.c') diff --git a/codegen.c b/codegen.c index 0807add..b939531 100644 --- a/codegen.c +++ b/codegen.c @@ -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); } -- cgit v1.2.3