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

Edward Diener via cfe-dev cfe-dev at lists.llvm.org
Mon Aug 24 21:43:27 PDT 2015


On 8/24/2015 11:38 PM, Yaron Keren via cfe-dev wrote:
>>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.
>
> clang may be built with any supported regardless the target. For
> example, I'm building clang using Visual C++ 64 bit and targetting the
> 32-bit version of mingw. You do need to have the target mingw installed
> for the include files, library files and linker.

Please see my other response in this thread to Ivan. My experience is 
clearly that a 32-bit version of clang does not work when a 64-bit 
version of mingw-64/gcc is first in the Windows PATH. I also explained 
this previously in my post "Clang on Windows targeting mingw-64/gcc 
building 64bit code", which was unanswered.

>
>
>
> 2015-08-25 5:15 GMT+03:00 Edward Diener via cfe-dev
> <cfe-dev-NBbBogny7ofFcdTEL8lfRQ at public.gmane.org
> <mailto:cfe-dev-NBbBogny7ofFcdTEL8lfRQ at public.gmane.org>>:
>
>     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
>         <mailto:cfe-dev-NBbBogny7ofFcdTEL8lfRQ at public.gmane.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