This is an archive of the discontinued LLVM Phabricator instance.

For clang-cl, implement additional compatibility arguments (/vm,/GF,/GF-,/Zm,/bigobj).
ClosedPublic

Authored by kumquats.a.pair on Oct 3 2013, 4:12 AM.

Details

Reviewers
kumquats.a.pair
Summary

/vm* - There may be appropriate code in MicrosoftCXXABI.cpp to accommodate supporting this flag, but for now clang-cl compile arguments do not modify the behavior in MicrosoftCXXABI.cpp, so I set it up as unsupported.

/GF - Ignoring this flag as it appears to be the default behavior for C++ in Clang.

/GF- - For compatibility with some versions of cl.exe, aliasing to fwritable-strings. Empirical testing showed that /GF- was accepted, but did not function as described in the documentation for cl.exe 17.00.60610.1, but it should work for older versions of cl.exe.

/Zm - Ignoring this option because it is cl.exe specific and there's no reason to alarm the user that it has no consequences.

/bigobj - not supported that I know of.

Diff Detail

Event Timeline

kumquats.a.pair added a subscriber: Unknown Object (MLST).Oct 3 2013, 4:25 AM

This is a patch for clang-cl that implements additional compatibility arguments (/vm,/GF,/GF-,/Zm,/bigobj). Please review.

rnk added a comment.Oct 3 2013, 1:18 PM

Looks good, do you need somebody to commit it?

include/clang/Driver/CLCompatOptions.td
178

Can you split this into the little /vm optoins, so we don't accept unknown /vmasdf args? I think we can accept and ignore /vmg, since that's our default behavior. We used to default to /vmb. I'd actually like to add support for going back to that mode, even though it doesn't conform.

kumquats.a.pair updated this revision to Unknown Object (????).Oct 3 2013, 4:07 PM

Thanks for reviewing. I have modified the patch as requested in review.

The /vm* options are now enumerated individually.

/vmg - now silently ignored.
/vmb, /vmm, /vms, and /vmv - now marked as unsupported.

Please review again and submit if the revisions are acceptable.

Thanks!
David

rnk added a comment.Oct 7 2013, 4:22 PM

Thanks, committed in r192141.

kumquats.a.pair accepted this revision.Jan 22 2014, 10:38 PM
Eugene.Zelenko closed this revision.Oct 4 2016, 6:26 PM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in rL192141.