Skip to content

Commit

Permalink
[WIP] Call start function even in jit mode
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed May 3, 2024
1 parent 4d6ac05 commit d517bb7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main_shim.rs
Expand Up @@ -43,7 +43,7 @@ pub(crate) fn maybe_create_entry_wrapper(
m: &mut impl Module,
unwind_context: &mut UnwindContext,
rust_main_def_id: DefId,
ignore_lang_start_wrapper: bool,
_ignore_lang_start_wrapper: bool,
is_main_fn: bool,
sigpipe: u8,
) {
Expand Down Expand Up @@ -100,7 +100,9 @@ pub(crate) fn maybe_create_entry_wrapper(

let main_func_ref = m.declare_func_in_func(main_func_id, &mut bcx.func);

let result = if is_main_fn && ignore_lang_start_wrapper {
let result = if is_main_fn && false
/*&& ignore_lang_start_wrapper*/
{
// regular main fn, but ignoring #[lang = "start"] as we are running in the jit
// FIXME set program arguments somehow
let call_inst = bcx.ins().call(main_func_ref, &[]);
Expand Down

0 comments on commit d517bb7

Please sign in to comment.