[PATCH] D47500: [WebAssembly] Add support for response file parsing

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 29 16:38:33 PDT 2018


ruiu added inline comments.


================
Comment at: wasm/Options.td:76-77
 
+defm rsp_quoting: Eq<"rsp-quoting">,
+  HelpText<"Quoting style for response files. Values supported: windows|posix">;
+
----------------
sbc100 wrote:
> ruiu wrote:
> > Do you really need to support both Windows and Unix-style quoting rules? IMO Windows' quoting rule is pretty hairly, and you should always use Unix-style quoting rule if possible. Since you are the only generator who create response files, you can just create response files in Unix style, no?
> My understanding is that the higher level toolchain driver can generate a repsonse file.   e.g. visual studio CMake, or ninja?   I would have thought that we want to at least use windows quoting when running on windows even if we don't really need to the command line flag. 
> 
> Perhaps you are right though and we should add this if and when we get our first windows user who wants to include unquoted filenames.
> 
> Also, I'm not sure why you mention complexity is an issue.  We are not generating these files, only consuming them and it seems that llvm already handle both types of quoting.
I'd support only Unix-style first. We can support Windows-style quoting later when it is proved to be needed.

As to the complexity, adding a new command line option or a new feature always adds some complexity. Once we start supporting some feature, we'll have to support it virtually forever.  Also, by adding this option, you allow users to write response files in two different styles, whose default choice depends on your platform. It is not hard to imagine that that could theoretically allow you to write code that works on your platform but doesn't on the other. Having less number of moving parts is generally preferred.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D47500





More information about the llvm-commits mailing list