[PATCH] D107930: [LLD] [MinGW] Add more options for disabling flags in the executable

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 11 13:48:06 PDT 2021


mstorsjo created this revision.
mstorsjo added reviewers: rnk, mati865, jeremyd2019.
Herald added a subscriber: dang.
mstorsjo requested review of this revision.
Herald added a project: LLVM.

In e72403f96de7f1c681acd5968f72aa986412dfce <https://reviews.llvm.org/rGe72403f96de7f1c681acd5968f72aa986412dfce>, we added the flag
"--no-dynamicbase" for disabling the dynamicbase flag which we set
by default. At the time, ld.bfd didn't have any corresponding
option (as ld.bfd defaulted to not setting the flag). Almost at
the same time, corresponding options were added to ld.bfd for
disabling it (while it was being enabled by default), with a
different name, "--disable-dynamicbase".

Thus add the "--disable-dynamicbase" option. Make this default
one advertised in the help listing, but keep the "--no-dynamicbase"
form as an alias. Also improve checking for the last option set
if there are multiple ones on the same command line.

Also add corresponding disable options for a lot of other flags
that we set by default, also added in ld.bfd in the same commit:
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=514b4e191d5f46de8e142fe216e677a35fa9c4bb


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D107930

Files:
  lld/MinGW/Driver.cpp
  lld/MinGW/Options.td
  lld/test/MinGW/driver.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107930.365844.patch
Type: text/x-patch
Size: 9238 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210811/2a780f91/attachment.bin>


More information about the llvm-commits mailing list