What are the plans for creating a Windows Binary Release of Clang?

Hello,

I am new to Clang. Over the weekend, I followed the instructions for building Clang on Windows but because of some issues with the Visual Studio 2008 libraries, I had to modify the Visual Studio 2008 libraries to get Clang to build. Ideally, I would like to see the Windows version of Clang get to the point where you can use Clang to build itself and we have a binary release of Clang available for people to use for other projects.

Are there any existing plans produce a binary release of Clang for Windows and to get Clang and related build tools to the point where Clang is the compiler of choice for building Clang on Windows? If there is, where can I find that plan and how can I help? If not, what needs to happen to create such a plan?

Devin Crumb

There is a binary build here http://llvm.org/builds/

Yaron

Interesting but it looks like this binary is intended to be integrated with Visual Studio 2010 or Visual Studio 2012. Why is that? Are there any plans to create a binary release that does not require the user to have any proprietary software already installed?

For me, I want to move to Clang because I want to start using C++11 features. I do not want to buy a new version of Visual Studio (I currently have VS2008) and Clang looks to be better than GCC.

clang does not have C include files and (I think) linker on Windows so it’s still not a standalone toolchain. It can use these from Visual C++ or if you want non-proprietary toolchain, install clang with gcc-based MingW http://www.mingw.org.

Yaron

Are you telling me that you do not want Clang to eventually have its own non-proprietary toolchain for Windows? If that is really the case, why? If not, is there a plan to create a Clang non-proprietary toolchain for Windows and how can I help? If there is not a plan, what needs to happen to create such a plan?

Hello Devin,

We're producing a Windows version of clang at http://clang.org

These unofficial builds are updated QA'd daily in the run up to 3.4, and
the focus to package clang as a tooling SDK.

This is mainly trunk, with the patches for bugfixes applied that haven't
completed review yet (MemoryBuffer mmap fix, RTTI mangling error fix for
MSVC ABI etc.) The patches used can all be found on the bug tracker or
here mailing list.

The package is built on Visual Studio 2013 / Windows 8.1 in C++11 mode
so currently doesn't run on Windows XP -- the aim is to see how this
will work out as there's been a debate lately on MSVC versions to support.

Today's build includes the C# binding and a new Windows AST viewer
(Clang Explorer) to help make the package more accessible to beginners.
Python / Node.js bindings are lined up for tomorrows build.

The main difference from the installer on LLVM.org is that this one is
dedicated to the clang frontend and aims to test and stabilise the
latest patches, and is code signed for use in a corporate environment etc.

Alp.

This includes the current set of Windows patches

It looks like Clang.org links back to llvm.org/builds which indicates that the build “integrates with MSVC 2010 and 2012.” That is a problem for me as I only have MSVC 2008 and am unwilling to buy a newer version of MSVC (it is just cost too much). In fact, one of the reasons I am looking at Clang is to get access to a non-GPL and non-proprietary compiler and toolchain that runs on Windows.

I am willing to help make that happen but I do not know where to get started with this specific effort. So I am trying to figure out, is anyone already trying to get Clang to be able build itself and be independent of any GPL and/or proprietary software on Windows (with the exception of the Windows OS itself). If no one is currently working on this, what do I need to do to start this effort with support from the Clang community?

From some responses I have received from Yaron, it looks like I will need to use Mingw until this goal is accomplished. That is fine for now, so long as there is a plan to eventually make Clang independent. But, if the Clang community is against this goal, I would like to know why?

You can download the Express version for free, I believe.

~Aaron

Aaron,

Thanks for the information, I will try it out.

But I think there should still be an effort to get Clang to have a binary release that can be used independently and does not require MSVC or Mingw.

There is work done to build a linker ( http://lld.llvm.org/ ) to replace link.exe.

-- Jean-Daniel

Aaron,

Thanks for the information, I will try it out.

But I think there should still be an effort to get Clang to have a binary
release that can be used independently and does not require MSVC or Mingw.

There definitely is such an effort. Most of the work right now is happening
is in LLD and teaching clang to support the MS C++ ABI (subscribe to the
mailing lists and you'll see lots of activity).

-- Sean Silva

Hello Devin,

We're producing a Windows version of clang at http://clang.org

I think it's really unfortunate that you're running your own website and
rolling your own builds. =/ So others on the list know, this is not in any
way part of the LLVM open source project, it is not being maintained by the
community at large but by some individuals (Alp at least). Putting it at '
clang.org' is a best misleading.

The main difference from the installer on LLVM.org is that this one is
dedicated to the clang frontend and aims to test and stabilise the
latest patches, and is code signed for use in a corporate environment etc.

And that it isn't being produced or maintained by the LLVM open source
project. =[ I think the authors should make that much more clear, and I
hope that instead of running their own website they instead help contribute
to the open source build, test, and release process. (Note, I know that Alp
at least has contributed a few patches, but certainly hasn't been
responsible for the overwhelming majority of the work to bring Clang to
Windows.)

Sean,

Is there a mailing list for LLD development that I can join so I can help get LLD running on Windows?

This is (at the moment) an explicit non-goal of the folks working on this
as part of the open-source project. Myself and several others would argue
strongly against pursuing it. We're not going to (both because we don't
want to and because we couldn't succeed even if we did) replace Visual
Studio or provide an alternative to it. Our primary goal is to complement
and integrate with it as best we can.

-Chandler

heh - I think this is great - Thanks for making this easier Alp. I hope it's useful to many people (For fun I'll give it a try)

    Hello Devin,

    We're producing a Windows version of clang at http://clang.org

I think it's really unfortunate that you're running your own website
and rolling your own builds. =/ So others on the list know, this is
not in any way part of the LLVM open source project, it is not being
maintained by the community at large but by some individuals (Alp at
least). Putting it at 'clang.org <http://clang.org>' is a best misleading.

And llvm-reviews.chandlerc.com is maintained by the community, *ahem*?

But yes, let's add some links from the documentation on llvm.org if you
think it'll clear things up. It's just there's not much there :slight_smile:

    The main difference from the installer on LLVM.org is that this one is
    dedicated to the clang frontend and aims to test and stabilise the
    latest patches, and is code signed for use in a corporate
    environment etc.

And that it isn't being produced or maintained by the LLVM open source
project. =[ I think the authors should make that much more clear, and
I hope that instead of running their own website they instead help
contribute to the open source build, test, and release process.

All these patches are on the bug tracker, mailing list or already
committed. There are a few issues that are showing up as regular dupes
on the bug tracker and need work including PR17403 and these builds help
test whether features are good to land for 3.4.

Since yesterday the builds are also helping answer questions like
whether Visual Studio 2013 produces builds compatible with Windows XP
(answer is No right now -- we need to find the right flags and see how
much C++11 we can get out of it).

(Note, I know that Alp at least has contributed a few patches, but
certainly hasn't been responsible for the overwhelming majority of the
work to bring Clang to Windows.)

Nobody ever claimed that -- it's absolutely a group effort. My work
since 2010 on the LLVM project has generally been in the C++ frontend
targeting Unix so this is new to me as well. You could have looked that
up easily.

That said we did go to some expense to start setting up this builder and
I'm not too interested in unconstructive responses at this point.

Alp.

Hi Devin

A clang independent toolchain for Windows would be great. Not all the pieces are ready. Some of the missing parts are

  • C library (msvcrt does not supply everything).
  • C headers (do note that the MingW C headers are not GPL and mostly Public Domain).
  • Linker.
  • C++ lib (libcxx) completely passing tests.

Yaron

/*
I love the terms "we" and "our" - Kindly don't speak others - While such lofty goals may be ridiculous or not interesting to *you*.
*/

*My* view is that both a Mingw* and MSVC toolchain alternative is absolutely necessary. This is not to say either of those tools are lacking in any way, but a little easy to use competition is a good thing.

While I can't contribute much to Windows port myself - I'm willing to help sponsor some work to achieve this goal or hardware if/where necessary. Anyone interested feel free to contact me off list.

    But I think there should still be an effort to get Clang to have a
    binary release that can be used independently and does not require
    MSVC or Mingw.

This is (at the moment) an explicit non-goal of the folks working on this
as part of the open-source project. Myself and several others would argue
strongly against pursuing it. We're not going to (both because we don't
want to and because we couldn't succeed even if we did) replace Visual
Studio or provide an alternative to it. Our primary goal is to complement
and integrate with it as best we can.

/*
I love the terms "we" and "our" - Kindly don't speak others - While such
lofty goals may be ridiculous or not interesting to *you*.

I can speak for some others. ;]

Notably, I'm summarizing the position of most of the contributors to LLVM's
Windows support, and I'm summarizing the essential aspects of the open
source project's direction. Certainly, others are welcome to pursue other
directions, but I'm trying to set expectations appropriately.

*/

*My* view is that both a Mingw* and MSVC toolchain alternative is
absolutely necessary.

Sure. However, as you point out, you aren't contributing any patches in
this direction.

> I think it's really unfortunate that you're running your own website
> and rolling your own builds. =/ So others on the list know, this is
> not in any way part of the LLVM open source project, it is not being
> maintained by the community at large but by some individuals (Alp at
> least). Putting it at 'clang.org <http://clang.org>' is a best
misleading.

And llvm-reviews.chandlerc.com is maintained by the community, *ahem*?

See the email threads specifically requesting that this be incorporated as "
reviews.llvm.org", and saying that the current domain was just to demo the
tool. We're still waiting on folks to set up the domain for us, but the
entire community actually reviewed the documentation for this tool and we
had strong positive response from the community before even proposing wider
usage.

But yes, let's add some links from the documentation on llvm.org if you
think it'll clear things up. It's just there's not much there :slight_smile:

That's not really what I think needs fixing. I would much rather keep
information about LLVM and Clang on the LLVM and Clang webpages. Not on
separate other webpages with domains that lead to confusion. We don't need
more webpages ultimately, and we don't need more places to go to find
information about Clang, Windows, or other interactions.