From d695e87c161258315bed6377ba021da1679e03aa Mon Sep 17 00:00:00 2001 From: David Gonzalez Martin Date: Thu, 12 Jun 2025 18:00:18 -0600 Subject: [PATCH] Pass 'argv' --- src/compiler.bbb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/compiler.bbb b/src/compiler.bbb index 1cd46ab..927f187 100644 --- a/src/compiler.bbb +++ b/src/compiler.bbb @@ -1432,6 +1432,10 @@ type_is_signed = fn (type: &Type) u1 { return type_is_signed(type.content.enum.backing_type); }, + .pointer => + { + return 0; + }, else => { #trap(); @@ -11862,6 +11866,7 @@ names: [_][]u8 = [ "function_pointer", "extern", "byte_size", + "argv", ]; [export] main = fn [cc(c)] (argument_count: u32, argv: &&u8, envp: &&u8) s32 @@ -11955,7 +11960,7 @@ names: [_][]u8 = [ >position = arena.position; >relative_file_path = arena_join_string(arena, [ "tests/", name, ".bbb" ][..]); - >compiler_path = compile_file(arena, { + >executable_path = compile_file(arena, { .relative_file_path = relative_file_path, .build_mode = build_mode, .has_debug_info = has_debug_info, @@ -11963,8 +11968,7 @@ names: [_][]u8 = [ }); >arguments: [_]&u8 = [ - compiler_path.pointer, - "test", + executable_path.pointer, zero, ]; >args = arguments[..arguments.length - 1];