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

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 10 02:21:23 PDT 2019


ruiu added a comment.

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().

>> I believe if you are using MinGW, you are always using Unix-style quoting in response files
> 
> At least the default in ELF/DriverUtils.cpp is to use windows quoting style, if the linker binary runs on windows, FWIW.

IIRC lld works that way because that's what ninja does, but I may be wrong.


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