mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 00:01:16 +00:00
emit LLVM IR that can be compiled to wasm
This commit is contained in:
parent
5a7a9e9520
commit
0a7f7a2772
9 changed files with 33 additions and 25 deletions
|
@ -93,8 +93,9 @@ pub fn gen_from_mono_module(
|
|||
}
|
||||
|
||||
// Generate the binary
|
||||
let ptr_bytes = target.pointer_width().unwrap().bytes() as u32;
|
||||
let context = Context::create();
|
||||
let module = arena.alloc(module_from_builtins(&context, "app"));
|
||||
let module = arena.alloc(module_from_builtins(&context, "app", ptr_bytes));
|
||||
|
||||
// strip Zig debug stuff
|
||||
// module.strip_debug_info();
|
||||
|
@ -134,7 +135,6 @@ pub fn gen_from_mono_module(
|
|||
let (mpm, _fpm) = roc_gen_llvm::llvm::build::construct_optimization_passes(module, opt_level);
|
||||
|
||||
// Compile and add all the Procs before adding main
|
||||
let ptr_bytes = target.pointer_width().unwrap().bytes() as u32;
|
||||
let env = roc_gen_llvm::llvm::build::Env {
|
||||
arena,
|
||||
builder: &builder,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue