Skip to content

Commit

Permalink
Accept and ignore -(-)(enable,disable)-auto-image-base linker options.
Browse files Browse the repository at this point in the history
These options are used by Libtool when targeting MinGW triples. They are ignored
by LLD; probably safe for us to do the same.

Closes ziglang#19613.
  • Loading branch information
alexrp committed Jun 22, 2024
1 parent 9be9b8c commit 7c9c194
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2330,6 +2330,12 @@ fn buildOutputType(
stack_size = parseStackSize(linker_args_it.nextOrFatal());
} else if (mem.eql(u8, arg, "--image-base")) {
image_base = parseImageBase(linker_args_it.nextOrFatal());
} else if (mem.eql(u8, arg, "--enable-auto-image-base") or
mem.eql(u8, arg, "-disable-auto-image-base") or
mem.eql(u8, arg, "--disable-auto-image-base") or
mem.eql(u8, arg, "-disable-auto-image-base"))
{
// These are ignored by LLD, but are used by Libtool for MinGW triples.
} else if (mem.eql(u8, arg, "-T") or mem.eql(u8, arg, "--script")) {
linker_script = linker_args_it.nextOrFatal();
} else if (mem.eql(u8, arg, "--eh-frame-hdr")) {
Expand Down

0 comments on commit 7c9c194

Please sign in to comment.