[cfe-dev] Trying again - building 64bit code on Windows

Edward Diener via cfe-dev cfe-dev at lists.llvm.org
Mon Aug 24 19:15:51 PDT 2015


On 8/24/2015 6:27 PM, Hans Wennborg via cfe-dev wrote:
> On Mon, Aug 24, 2015 at 2:36 PM, Edward Diener via cfe-dev
> <cfe-dev at lists.llvm.org> wrote:
>> Is clang built form the latest svn source capable of creating 64-bit code on
>> a Microsoft Windows 64-bit OS ?
>
> Yes. We build 64-bit Chromium on Windows with Clang continuously.
>
>> If yes, is this done through the -m64 option
>> or do I have to build clang from source in some particular way to enable the
>> functionality ?
>
> Yes, using clang-cl -m64 is how we do it.

Evidently to build a version of clang on Windows targeting mingw-64/gcc, 
which can compile 64-bit code, one must build clang with a 64-bit 
version of mingw-64/gcc. This may be apparent to you and other clang 
developers but it was not apparent to me.

I would like to add to the documentation on the clang "Getting Started: 
Building and Running Clang" page at 
http://clang.llvm.org/get_started.html a section of documentation 
following the section "Using Visual Studio" called "Using 
mingw(-64)/gcc". This section would explain how to build clang on 
Windows using ninja, CMake, and a mingw(-64)/gcc implementation and how 
to run clang from the command line using a mingw(-64)/gcc RTL. I am 
willing to completely write this documentation, to be vetted by whatever 
clang developer takes care of that "Getting Started" page, in order to 
help other developers build and run clang on Windows with the 
mingw(-64)/gcc RTL.




More information about the cfe-dev mailing list