diff options
| author | Nakst <djnakst2@gmail.com> | 2017-11-26 11:03:11 +0000 |
|---|---|---|
| committer | Nakst <djnakst2@gmail.com> | 2017-11-26 11:03:11 +0000 |
| commit | b0d3fbba4761aff3dfc3bcded3da7000699a7766 (patch) | |
| tree | 0e01e8d853324dad51addbd416c1fe8156c097a3 /src/ir.cpp | |
| parent | adb6c7637e8748b19e550e45cba42d1155657249 (diff) | |
essence cross compile
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index bf7c8c260..6913675ea 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -8634,6 +8634,14 @@ void ir_gen_tree(irGen *s) { if (!(build_context.is_dll && !has_dll_main)) { // main :: proc(argc: i32, argv: ^^u8) -> i32 String name = str_lit("main"); + + if (str_eq_ignore_case(cross_compile_target, str_lit("Essence"))) { + // This is a bit hacky, + // because this makes this function the first function run in the executable + // so it won't actually have the argc/argv arguments. + name = str_lit("ProgramEntry"); + } + Type *proc_params = make_type_tuple(a); Type *proc_results = make_type_tuple(a); |