[LLVMdev] Windows interface for clang
Reid Kleckner
rnk at google.com
Wed Jul 15 09:11:55 PDT 2015
On Thu, Jul 9, 2015 at 6:18 PM, Russell Wallace <russell.wallace at gmail.com>
wrote:
> On Fri, Jul 10, 2015 at 2:00 AM, Chandler Carruth <chandlerc at google.com>
> wrote:
>
>> This seems more relevant to cfe-dev.
>>
>
> Okay.
>
>>
>> You seem to be struggling with the need to name the binary 'cl.exe'. Last
>> time I checked, we installed clang-cl.exe under that name in a specialized
>> director specifically so you can use build systems relying on that name.
>>
>
> Right, but:
>
> 1. The existence of a binary named cl.exe isn't enough; depending on the
> circumstances, the build system may look specifically in the visual studio
> directory. Of course, you could do the rename/copy by hand, but it's better
> to have it automated, particularly since in practice there is a need to
> switch back and forth.
>
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.
2. Python at least needs to have it switchable specifically for 32-bit or
> 64-bit builds.
>
> 3. wic also supplies the option -Wno-invalid-token-paste which is
> necessary for compatibility with the Microsoft preprocessor. I intend
> adding other options as needed.
>
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.
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.
> 4. Hopefully can also substitute calls to the llvm linke when that's ready
> for prime time.
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150715/4ef48359/attachment.html>
More information about the llvm-dev
mailing list