Page MenuHomePhabricator

[llvm-rc] Support joined or separate spelling for /fo flag

Authored by phosek on Nov 6 2018, 5:47 PM.



CMake invokes rc using the joined spelling which appears to be supported
by Microsoft's rc implementation, so we should support it as well.

Diff Detail


Event Timeline

phosek created this revision.Nov 6 2018, 5:47 PM

Could you add a test for this? (I guess it's easiest to change one of the existing tests to use a different syntax in one place.)

Also, this isn't the only option that can be JoinedOrSeparate, with a quick test it seems like this goes for at least CODEPAGE and DEFINE as well, probably for all of them. But I won't demand fixing all of them at once, as they're tangential to what you need, and many of them aren't really implemented in llvm-rc yet.

phosek updated this revision to Diff 173045.Nov 7 2018, 3:10 PM

Test added, I'd be fine adding tests for more flags in subsequent changes.

mstorsjo accepted this revision.Nov 8 2018, 1:14 AM


Fwiw, if you use llvm-rc with flags starting with a dash instead of a slash, llvm-rc -FO/path/to/out.res input.rc does run successfully and silently (but doesn't output the file in the intended place, the option just appears to be ignored). That might be an issue someone (myself included) perhaps should take a look at at some point...

This revision is now accepted and ready to land.Nov 8 2018, 1:14 AM
This revision was automatically updated to reflect the committed changes.