Skip to content
/ zig Public
forked from ziglang/zig

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 efab16c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2330,6 +2330,11 @@ 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 efab16c

Please sign in to comment.