mirror of
https://github.com/ziglang/zig.git
synced 2025-12-27 08:33:15 +00:00
[linker] ignore --sort-common
From ld.lld(1):
--sort-common
This option is ignored for GNU compatibility.
Refs https://github.com/zigchroot/zig-chroot/issues/1
This commit is contained in:
parent
b1b944a683
commit
705e9cb3ca
@ -1619,6 +1619,10 @@ fn buildOutputType(
|
||||
build_id = true;
|
||||
warn("ignoring build-id style argument: '{s}'", .{value});
|
||||
continue;
|
||||
} else if (mem.eql(u8, key, "--sort-common")) {
|
||||
// this ignores --sort=common=<anything>; ignoring plain --sort-common
|
||||
// is done below.
|
||||
continue;
|
||||
}
|
||||
try linker_args.append(key);
|
||||
try linker_args.append(value);
|
||||
@ -1631,6 +1635,9 @@ fn buildOutputType(
|
||||
needed = true;
|
||||
} else if (mem.eql(u8, linker_arg, "-no-pie")) {
|
||||
want_pie = false;
|
||||
} else if (mem.eql(u8, linker_arg, "--sort-common")) {
|
||||
// from ld.lld(1): --sort-common is ignored for GNU compatibility,
|
||||
// this ignores plain --sort-common
|
||||
} else if (mem.eql(u8, linker_arg, "--whole-archive") or
|
||||
mem.eql(u8, linker_arg, "-whole-archive"))
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user