env: Keep -dead_strip off bare-metal links

The flavor is detected from the driver's own linker, which on macOS
is Apple's, while a bare-metal target links with LLD. LLD refuses
the option, so every link probe fails and each feature behind one
is detected as missing.
This commit is contained in:
Ole André Vadla Ravnås committed 2026-08-27 17:46:13 +02:00
1 parent 9cdc0c0e43
commit de49bff33d
1 file changed
+1 -1
+1 -1
View File
@@ -288,7 +288,7 @@ def init_machine_config(machine: MachineSpec,
linker_flags += ["-Wl,-z,relro"]
cxx_link_flags += ["-static-libstdc++"]
if linker_flavor == "apple":
if linker_flavor == "apple" and not bare:
linker_flags += ["-Wl,-dead_strip"]
elif not bare:
# Would leave a link with no entry point holding on to nothing at all,