This commit is contained in:
Edgar 2024-02-03 20:21:14 +01:00
parent 8f1c094b60
commit 497072760d
No known key found for this signature in database
GPG key ID: 70ADAE8F35904387
2 changed files with 5 additions and 2 deletions

View file

@ -126,11 +126,11 @@ pub fn compile(
fn compile_module(ctx: &ModuleCompileCtx, module: &ir::ModuleBody) {
info!("compiling module");
for (fn_id, func) in module.functions.iter() {
for (_fn_id, func) in module.functions.iter() {
compile_fn_signature(ctx, func);
}
for (fn_id, func) in module.functions.iter() {
for (_fn_id, func) in module.functions.iter() {
compile_fn(ctx, func).unwrap();
}
}

View file

@ -54,6 +54,9 @@ pub fn main() -> Result<(), Box<dyn Error>> {
let cwd = std::env::current_dir()?;
// todo: find a better name, "target" would clash with rust if running in the source tree.
let target_dir = cwd.join("target_ed/");
if !target_dir.exists() {
std::fs::create_dir_all(&target_dir)?;
}
let output_file = target_dir.join(PathBuf::from(args.input.file_name().unwrap()));
let output_file = if args.library {
output_file.with_extension("so")