Fixes PR37620
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
wasm/Options.td | ||
---|---|---|
76–77 ↗ | (On Diff #148991) | 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? |
wasm/Options.td | ||
---|---|---|
76–77 ↗ | (On Diff #148991) | 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. |
wasm/Options.td | ||
---|---|---|
76–77 ↗ | (On Diff #148991) | 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. |
wasm/Driver.cpp | ||
---|---|---|
145 ↗ | (On Diff #149027) | I think you should add ExpandResponseFiles before this line. |
wasm/Driver.cpp | ||
---|---|---|
145 ↗ | (On Diff #149027) | ParseArgs is called twice, once before and once after. This is the how COFF and ELF do it too. |
wasm/Driver.cpp | ||
---|---|---|
145 ↗ | (On Diff #149027) | But you don't need to cargo-cult that, no? |
- feedback
wasm/Driver.cpp | ||
---|---|---|
145 ↗ | (On Diff #149027) | Oh, sorry yes. The double parsing is only needed in order to handle OPT_rsp_quoting which I removed from this change. |