[cfe-dev] Windows and Clang

Joshua Gerrard via cfe-dev cfe-dev at lists.llvm.org
Thu Sep 3 04:38:48 PDT 2015


After some digging, it turns out we're hitting this bug:
https://llvm.org/bugs/show_bug.cgi?id=23518

Thanks for all your help :) looks like we're going to have to go through
our code and remove all the exceptions ...

--
Joshua Gerrard
JUCE Software Developer

The Seaboard GRAND is a breakthrough new musical instrument called “the
piano of the future” (CNN) and “influential, innovative, and inspiring” and
“ingenious” (Telegraph). With orders from 34 countries, the Seaboard GRAND
is now shipping and available for sale at www.roli.com/seaboard

Office: +44(0)207 254 2155
Cell:    07885 557494

ROLI
2 Glebe Road, London E8 4BD
www.roli.com

Discover more about us on Facebook - Twitter - Youtube

ROLI Ltd. is a registered company in England and Wales, and this e-mail and
its attachment(s) are intended for the above named only and are
confidential. If they have come to you in error then you must take no
action based upon them but contact us immediately. Any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it
is prohibited and may be unlawful. Although this e-mail and its attachments
are believed to be free of any virus, it is the responsibility of the
recipient to ensure that they are virus free. If you contact us by e-mail
then we will store your name and address to facilitate communications. Any
statements contained herein are those of the individual and not the
organisation.


On 3 September 2015 at 12:20, Joshua Gerrard <joshua.gerrard at roli.com>
wrote:

> Forgot to add cfe-dev back in
>
> ---------- Forwarded message ----------
> From: Joshua Gerrard <joshua.gerrard at roli.com>
> Date: 3 September 2015 at 11:44
> Subject: Re: [cfe-dev] Windows and Clang
> To: Russell Wallace <russell.wallace at gmail.com>
>
>
> Yes, that's pretty recent.
>
> I *think* the compiler-rt stuff is needed because we pull information out
> of clang whilst it's compiling apparently (I had to go and ask someone else
> about this). I know that the project doesn't compile without it.
>
> As for what's going wrong ...
>
> *Release:*
> - sometimes it crashes outright with nothing to give us an idea of why,
> the diagnostics we get back are in a different order every time, even when
> the number of threads is set to 1 in our project, and all other sorts of
> random things that scream undefined behaviour with no clue as to where it
> is.
>
> *Debug:*
> - Windows headers are throwing errors out, even though the MSVC
> compatibility flags and such are set as follows:
>
>         lo.MSVCCompat = true;
>         lo.MSCompatibilityVersion = clang::LangOptions::MSVC2013;
>         lo.MicrosoftExt = true;
>         lo.AsmBlocks = true;
>
> Thank you for showing your build process too, after looking at it, it's
> slightly different from what I've got here so that might be a place to
> start. I'll do that now!
>
> Merci,
>
> Joshua
>
> On 3 September 2015 at 11:33, Russell Wallace <russell.wallace at gmail.com>
> wrote:
>
>> I also just ran a test trying to compile my project with clang and link
>> it with all the libraries that had been compiled with Microsoft C++:
>>
>> clang-cl -fms-compatibility-version=19 /J -I\llvm\build\include
>> -I\llvm\include -I\mpir /MTd *.cpp \llvm\build\Debug\lib\*.lib
>> \mpir\build.vc14\lib_mpir_core2\x64\Debug\mpir.lib
>>
>> And it all worked fine, even though a fair number of C++ features were
>> used. To emphasise, this is linking C++ object files compiled with
>> different compilers, something traditionally considered theoretically
>> impossible, and it works! Exceptions are the main things I don't use,
>> because they are still apparently a work in progress.
>>
>> On Thu, Sep 3, 2015 at 11:25 AM, Russell Wallace <
>> russell.wallace at gmail.com> wrote:
>>
>>> On Thu, Sep 3, 2015 at 11:16 AM, Joshua Gerrard <joshua.gerrard at roli.com
>>> > wrote:
>>>
>>>> I'm using Visual Studio 2013 (just because we suppose it'll be better
>>>> tested etc) with revision 245761 of clang, compiler-rt and llvm. I'm also
>>>> using the ORC JIT engine to compile the C++ code.
>>>>
>>>
>>> Current revision seems to be 246... so that's pretty recent, right?
>>>
>>> Is there a reason you need to use compiler-rt?
>>>
>>> The errors we're getting are non-deterministic, which is what is making
>>>> it so hard to figure out.
>>>>
>>>
>>> As in, crashes due to stray pointers?
>>>
>>> Are you building the release from source, and if so, what cmake flags
>>>> are you using?
>>>>
>>>
>>> Yes. https://github.com/russellw/ayane/blob/master/build-clang.bat
>>>
>>>
>>>> Any other things I should know about that you use to build your
>>>> project?
>>>>
>>>
>>> Current project build procedure:
>>>
>>> if "%VCINSTALLDIR%"=="" call "C:\Program Files (x86)\Microsoft Visual
>>> Studio 14.0\VC\vcvarsall" x64
>>> cl /Fea /I\llvm\build\include /I\llvm\include /I\mpir /MP /MTd *.cpp
>>> \llvm\build\Debug\lib\*.lib
>>> \mpir\build.vc14\lib_mpir_core2\x64\Debug\mpir.lib setargv.obj
>>>
>>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150903/dedbbfd1/attachment.html>


More information about the cfe-dev mailing list