[PATCH] D63024: [LLD] [Driver] Look for -flavor/-m in response files as well

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 10 02:33:25 PDT 2019


mstorsjo added a comment.

In D63024#1535947 <https://reviews.llvm.org/D63024#1535947>, @ruiu wrote:

> In D63024#1535918 <https://reviews.llvm.org/D63024#1535918>, @mstorsjo wrote:
>
> > In D63024#1535891 <https://reviews.llvm.org/D63024#1535891>, @ruiu wrote:
> >
> > > Do you have to support --rsp-quoting for the use case that you want to support?
> >
> >
> > Not for my use case, no. But Reid wanted to move all expansion of response files out from the individual linkers here, to avoid reading (and allocating memory for) the (potentially large) response file twice. And in that case, we must handle `--rsp-quoting` perfectly here.
>
>
> Each flavor's link() function is a public interface, and each function needs to do what the command would do when the same argument strings are given. That means we need to expand response files when the linker is invoked by lld::{coff,elf,wasm,..}::link().


Ah, right. So we at least must keep the handling there as well.

What's your opinion on Reid's performance/memory concern? Do you agree we should expand here and pass the expanded args to the individual linkers, to avoid double expansion? And how should we handle `rsp-quoting` then?

Or do you suggest to ignore the performance concern and expand once here just for peeking at the -m flag, and let the individual linkers expand it again, properly - like this patch?


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D63024





More information about the llvm-commits mailing list