aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaytan <laytanlaats@hotmail.com>2026-01-13 21:29:41 +0100
committerGitHub <noreply@github.com>2026-01-13 21:29:41 +0100
commit792e6c75ee08ba62ca5578ec3ec273e90a94668b (patch)
tree03d35fbebe482022a920e1b63e59ed5c0490f684 /src
parent4af4b2f5757a8d45aba6bf5db5c99faf63150173 (diff)
parent9d72025a0b6f7b94682662316b892ece865ad8aa (diff)
Merge branch 'master' into nbio
Diffstat (limited to 'src')
-rw-r--r--src/check_expr.cpp9
-rw-r--r--src/linker.cpp16
2 files changed, 24 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 98185b0d3..cd2307c6d 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -11554,6 +11554,15 @@ gb_internal ExprKind check_expr_base_internal(CheckerContext *c, Operand *o, Ast
return kind;
case_end;
+ case_ast_node(ht, HelperType, node);
+ Type *type = check_type(c, ht->type);
+ if (type != nullptr && type != t_invalid) {
+ o->mode = Addressing_Type;
+ o->type = type;
+ }
+ return kind;
+ case_end;
+
case_ast_node(i, Implicit, node);
switch (i->kind) {
case Token_context:
diff --git a/src/linker.cpp b/src/linker.cpp
index c2a3ee928..c68417994 100644
--- a/src/linker.cpp
+++ b/src/linker.cpp
@@ -737,7 +737,21 @@ try_cross_linking:;
}
if (build_context.build_mode == BuildMode_StaticLibrary) {
- compiler_error("TODO(bill): -build-mode:static on non-windows targets");
+ TIME_SECTION("Static Library Creation");
+
+ gbString ar_command = gb_string_make(heap_allocator(), "");
+ defer (gb_string_free(ar_command));
+
+ ar_command = gb_string_appendc(ar_command, "ar rcs ");
+ ar_command = gb_string_append_fmt(ar_command, "\"%.*s\" ", LIT(output_filename));
+ ar_command = gb_string_appendc(ar_command, object_files);
+
+ result = system_exec_command_line_app("ar", ar_command);
+ if (result) {
+ return result;
+ }
+
+ return result;
}
// NOTE(dweiler): We use clang as a frontend for the linker as there are