[PATCH] D154176: [Driver][MSVC] Move lld specific flags before inputs

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 1 12:42:54 PDT 2023


mstorsjo accepted this revision.
mstorsjo added a comment.
This revision is now accepted and ready to land.

In D154176#4466230 <https://reviews.llvm.org/D154176#4466230>, @HaohaiWen wrote:

> In D154176#4466190 <https://reviews.llvm.org/D154176#4466190>, @mstorsjo wrote:
>
>> In D154176#4466186 <https://reviews.llvm.org/D154176#4466186>, @mstorsjo wrote:
>>
>>> Ok, thanks for clarifying. However I still don’t understand the “why” aspect here. You’re writing
>>>
>>>> so that lld specific flags can be append before inputs
>>>
>>> Are you planning on adding such flags in a later patch, position dependent flags that need to be supplied before input files?
>>>
>>> Or does the change in order of command line arguments have an effect on the behavior of the linker in this case?
>>
>> Ok, on second thought, I guess that parsing the vfsoverlay option before the inputs makes it have an effect where it didn’t before. Is that right? (Most flags in lld aren’t very order dependent since it just checks for any occurrence of a flag anywhere among the arguments.)
>
> I'm planing to add /dwodir to linker when user specify -gsplit-dwarf and using lld and lto.
> The order does not matter.

Ok, thanks for clarifying that - since I didn't quite understand how this change would be needed for that option.

> I just want it looks more consistent and elegent since most flags are before inputs so that user can easily look for inputs when using -###.

Ok, that sounds reasonable. Please clarify that intent in the commit message, and this seems ok to me.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154176/new/

https://reviews.llvm.org/D154176



More information about the cfe-commits mailing list