[LLVMdev] Windows interface for clang

Russell Wallace russell.wallace at gmail.com
Wed Jul 15 09:54:49 PDT 2015


On Wed, Jul 15, 2015 at 5:11 PM, Reid Kleckner <rnk at google.com> wrote:
> For MSBuild, you can pass along /p:PlatformToolset=LLVM-vs2013 (or edit
the project file for the same effect) to bypass this. I know Python's build
is based on VS projects, so I would've expected this to work there. I
wouldn't know about Ruby or other builds, and I imagine swapping the binary
is useful for particularly inflexible systems.

Right, as you say, msbuild is relatively flexible and Python uses it, so
you would expect such techniques to work there, but unfortunately they
don't - I didn't use that particular flag, but I used similar ones that
allow pointing msbuild at a different compiler and it failed because
regardless of whether you select a 32 or 64 bit build, Python for some
reason requires some object file to be compiled 32-bit and some other one
to be compiled 64-bit.


>> Was the issue here in user code or a system header? If the invalid token
> paste came from a system header, we shouldn't have errored. If it's in user
> code, it's up to them to decide if they want to suppress the issue by
> adding the flag themselves or fix it for conformance.
>

User code, Python again. Mind you, I'm not disagreeing with you about the
scenario where one is writing new code with a view to making sure it works
with clang from the start. It's just that I'm dealing with the trickier
scenario where one is trying to compile a large quantity of code that has
already been written by other people without regard to clang.

>
> Different users have different needs, so it's not clear where the default
> level of conformance diagnostics vs. compatibility should be. I guess we
> should probably downgrade this to a -Wmicrosoft warning or something when
> MS compatibility is on.
>

I think so, yes. Greenfield projects can easily add flags for tighter
conformance checking if so desired.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150715/53bd51cd/attachment.html>


More information about the llvm-dev mailing list