[PATCH] D40017: [LLD] [MinGW] Add support for --dynamicbase, --nxcompat, --tsaware and --high-entropy-va

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 13:44:49 PST 2017


mstorsjo added a comment.

In https://reviews.llvm.org/D40017#925224, @rnk wrote:

> Are all of these defaults important for mingw compatibility, or just -dynamicbase?
>
> I really prefer LLD's defaults, which are inherited from MSVC. Users really shouldn't be making new PE images with executable data segments, or legacy pre-terminal server apps. We need to reserve the right to shed that cruft as time goes on. Microsoft accomplishes that by having very defined multi-year product cycles that are expected to have some migration cost. If the clang or gcc driver sets all these flags by default for the user, I don't care that much and I'd be OK with this patch.


Yeah, I would actually tend to agree with this - I'd rather have lld's defaults for those that are unlikely to actually have an impact in practice. And the probability that this will be the main issue for a user trying to link their mingw program with lld is pretty low since there's lots of other issues to run into anyway ;-)

Since there's no negative flag to use to disable it though, should we just ignore these options and pass nothing on to the coff driver, or should we just drop the negative defaults? I.e. if the user passed no option to the mingw driver, pass no flag to the coff driver (and implicitly use that default), if the user passed an option, pass a similar option onwards (even though it just reinforces the default)?


https://reviews.llvm.org/D40017





More information about the llvm-commits mailing list