From 27212a3e6bfe3cf988a12ba83ae7fbce186d960c Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 16 Jul 2025 14:26:23 -0700 Subject: [PATCH] LLD: don't default allow_shlib_undefined when cross compiling prevents e.g. lld-link: warning: undefined symbol: SystemFunction036 from being only a warning --- src/link/Lld.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/link/Lld.zig b/src/link/Lld.zig index 1aeeb5d214..296041822e 100644 --- a/src/link/Lld.zig +++ b/src/link/Lld.zig @@ -205,7 +205,6 @@ pub fn createEmpty( const target = &comp.root_mod.resolved_target.result; const output_mode = comp.config.output_mode; const optimize_mode = comp.root_mod.optimize_mode; - const is_native_os = comp.root_mod.resolved_target.is_native_os; const obj_file_ext: []const u8 = switch (target.ofmt) { .coff => "obj", @@ -234,7 +233,7 @@ pub fn createEmpty( .gc_sections = gc_sections, .print_gc_sections = options.print_gc_sections, .stack_size = stack_size, - .allow_shlib_undefined = options.allow_shlib_undefined orelse !is_native_os, + .allow_shlib_undefined = options.allow_shlib_undefined orelse false, .file = null, .build_id = options.build_id, },