[cfe-users] clang-cl pulls in random crap

Андрей Леликов via cfe-users cfe-users at lists.llvm.org
Wed Feb 12 14:51:20 PST 2020


Hi everyone, a newbie question.

I'm trying to build a "hello,world" application on windows. I have my 
own makefile and just changed cl.exe to clang-cl.exe. Anything fails to 
compile with an error like that:

clang: warning: argument unused during compilation: '/arch:SSE2' 
[-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '/GL-' 
[-Wunused-command-line-argument]
In file included from test.cpp
In file included from <....>
In file included from 
C:\PFx86\MicrosoftVisualStudio14.0\VC\include\excpt.h:12:
<... some error message ...>

Now, here is the thing. In no place have I asked it to use VS14 
includes. My only sin is that I have it installed on this machine.

The project I build is self-contained, in a sense that it has all 
necessary includes and libraries for complete build. All includes are 
explicitly specified (via -I) on command line, yet clang-cl somehow 
scanned my system, found a VS14 installation and decided to use includes 
from there.

Really?

Question: Is there a way to disable this crap, so the compiler would 
actually use what's specified on command line and not some random files 
it discovers?

Naively I tried to specify "-nobuiltininc" without any effect.

Any help?

Thanks...






More information about the cfe-users mailing list