[cfe-users] Getting -nostdinc to work with --driver-mode=cl

Ivan Koster via cfe-users cfe-users at lists.llvm.org
Sun Mar 20 15:47:33 PDT 2016

Hey all,

As soon as I enable --driver-mode=cl and -nostdinc at the same time and
compile a C file, i'm greeted with the error:
clang.exe: error: unknown argument: '-nostdinc'

I'm using the windows release:
clang version 3.8.0 (branches/release_38)
Target: x86_64-pc-windows-msvc

It seems this is supposed to be supported, because MSVCToolChain.cpp in
clang source uses this:

void MSVCToolChain::AddClangSystemIncludeArgs(...) {
    if (DriverArgs.hasArg(options::OPT_nostdinc)) return;

How do I get clang-cl mode to accept -nostdinc?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20160320/de328edb/attachment.html>

More information about the cfe-users mailing list