r258720 - [MSVC Compat] Only warn for unknown clang-cl arguments

Renato Golin via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 26 04:41:53 PST 2016


Hi,

So, the results I'm getting on that RUN list is:

1. clang -cake-is-lie etc.

Runs ok, prints expected error messages, returns 1.

2. clang-cl -cake-is-lie

I've hit an assert on
llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp:80:
llvm::MCCodeGenInfo* createAArch64MCCodeGenInfo(const llvm::Triple&,
llvm::Reloc::Model, llvm::CodeModel::Model, llvm::CodeGenOpt::Level):
Assertion `(TT.isOSBinFormatELF() || TT.isOSBinFormatMachO()) && "Only
expect Darwin and ELF targets"' failed.

Returns with error code 254, which is the one the bot was complaining
about. Script attached.

3. Same, with -Werror=unknown-argument

Runs ok, prints expected error messages, returns 1.

4. Same, with -Wno-unknown-argument

Fails on "// SILENT-NOT: error", since Clang's -v output contains:
"-ferror-limit 19". I think you'll have to be more specific there. I'm
not sure how this passed anywhere.

5. Clang -S

Get the expected warning, returns 0.

Hope that helps.

cheers,
--renato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-cl-error-zip.zip
Type: application/zip
Size: 1647 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160126/441bff25/attachment.zip>


More information about the cfe-commits mailing list