(no subject)

Hi Андре,

You need to install “the integration” (with VS) correctly.

For VS14 you’ll need to use ‘old style’ integration: https://github.com/degski/Clang.Props . This is a copy job.

For VS15, use the plugin on: https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.llvm-toolchain .

The latter don’t work for VS19, use this instead: https://github.com/degski/llvm2019 . For the latter, you’ll need to install the components to build a VS plugin-in. Just open and build the (llvm2019) project and VC will install the components to build the project. The resulting binary is unsigned and can only be used on your machine. If you go this route (the only counts for llvm2019), you’ll (possibly) need a fix to Windows (to build and run unsigned plugins), I’ll point it out to you if you need it and just ask.

In all ‘integrations’ the tool-chain’ (vc/clang-cl) can be selected from the pull-down menu in VS.

degski

PS: please refrain from nastiness if you haven’t yet researched the problem and are unaware that your solution simply possibly does not cut the mustard. Done properly the use of clang with VS is seamless.

Thanks for replying!

Unfortunately, this is not what I am looking for. Probably was not clear enough when I've asked.

I do NOT look for any sort of integration with VS. On contrary, I would like clang-cl.exe NOT to see any VS installations I might have on my machine.

What I see is that, no matter what I do, clang-cl.exe always discovers my VS installation and pulls include files from there. I don't need that. I need it only to see what is specified on command line.

Specifically, when compiling "hello, world" I would like it to fail with "stdio.h not found" and not with "I've scanned your system, found visual studio and decided to use include files from there, now I'm failing because of some incompatibility".

So, my questions are:

1. where is this "magic scan for includes" functionality is coming from?

2. how can I disable it? To make sure that clang-cl.exe is a compiler, that takes options and input files from command line, and not from some hard-coded heuristics.

Is it possible at all?