This is an archive of the discontinued LLVM Phabricator instance.

[COFF] Add support for /WX
ClosedPublic

Authored by smeenai on Oct 20 2017, 3:46 PM.

Details

Summary

link.exe supports this option to convert warnings into errors, and it's
useful to support in LLD as well.

Diff Detail

Repository
rL LLVM

Event Timeline

smeenai created this revision.Oct 20 2017, 3:46 PM
compnerd added inline comments.Oct 22 2017, 1:48 PM
COFF/Options.td
87–88 ↗(On Diff #119721)

You should move this down and use the QB multiclass instead.

ruiu added inline comments.Oct 22 2017, 5:13 PM
COFF/DriverUtils.cpp
743 ↗(On Diff #119721)

nit: add parentheses on RHS.

COFF/Options.td
87–88 ↗(On Diff #119721)

Yes, you can use QB instead.

smeenai added inline comments.Oct 23 2017, 9:15 AM
COFF/Options.td
87–88 ↗(On Diff #119721)

QB is defined in the section for unimplemented arguments, so if anything I'd want to move QB up. However, as best as I can tell, QB doesn't allow specifying help text. We already have B, which is what I was using originally, but that only allows specifying help text for the :no part. I could extend either of those macros to accept a help text for both options or introduce a new multiclass, of course.

ruiu added inline comments.Oct 23 2017, 9:32 AM
COFF/Options.td
87–88 ↗(On Diff #119721)

Makes sense. I'm fine with this.

ruiu accepted this revision.Oct 24 2017, 1:55 PM

LGTM

This revision is now accepted and ready to land.Oct 24 2017, 1:55 PM
This revision was automatically updated to reflect the committed changes.