summaryrefslogtreecommitdiff
path: root/src/driver/amgc_driver_ctx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver/amgc_driver_ctx.c')
-rw-r--r--src/driver/amgc_driver_ctx.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/driver/amgc_driver_ctx.c b/src/driver/amgc_driver_ctx.c
index 35d3899..7bb59a9 100644
--- a/src/driver/amgc_driver_ctx.c
+++ b/src/driver/amgc_driver_ctx.c
@@ -10,6 +10,7 @@
#include <cparser/driver/driver.h>
#include <cparser/driver/driver_t.h>
+#include <cparser/driver/target.h>
#include <cparser/driver/tempfile.h>
#include <cparser/firm/ast2firm.h>
#include <cparser/firm/firm_opt.h>
@@ -110,6 +111,9 @@ static int amgc_init_cparser(void)
init_ast();
init_gen_firm();
+ target_set_defaults();
+ target_setup();
+
return 0;
}
@@ -163,6 +167,7 @@ int amgc_get_driver_ctx(
ctx->ctx.program = program;
ctx->ctx.cctx = &ctx->cctx;
+ ctx->cctx.ccenv = &ctx->ccenv;
*pctx = &ctx->ctx;
return AMGC_OK;