Anyone uses Clang 3.8 and higher on Windows with MinGW-w64?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Anyone uses Clang 3.8 and higher on Windows with MinGW-w64?

Boris Kolpackov via cfe-dev
I can't get it to work, Clang 3.8, 3.9 and 4.0 appear to ignore PATH
environment variable and fail to find MinGW headers, while Clang 3.7
and 3.7.1 can find and use them just fine.

Anyone tried Clang 3.8+ versions with MinGW-w64?
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Anyone uses Clang 3.8 and higher on Windows with MinGW-w64?

Boris Kolpackov via cfe-dev
clang works fine with mingw-builds from   https://sourceforge.net/projects/mingw-w64/


‫בתאריך יום ב׳, 20 במרץ 2017 ב-6:31 מאת ‪Constantine via cfe-dev‬‏ <‪[hidden email]‬‏>:‬
I can't get it to work, Clang 3.8, 3.9 and 4.0 appear to ignore PATH
environment variable and fail to find MinGW headers, while Clang 3.7
and 3.7.1 can find and use them just fine.

Anyone tried Clang 3.8+ versions with MinGW-w64?
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Anyone uses Clang 3.8 and higher on Windows with MinGW-w64?

Boris Kolpackov via cfe-dev

 It's far from being drop-in replacement for GCC.

At MSYS2 we have patched Clang working only a little better than installed from LLVM website but there is still a lot to fix.


------ Original Message ------
Subject: Re: [cfe-dev] Anyone uses Clang 3.8 and higher on Windows with MinGW-w64?
Date: Mon, 20 Mar 2017 09:57:38 +0000
To: Constantine, Cfe-dev
From: Yaron Keren Via Cfe-dev
clang works fine with mingw-builds from   https://sourceforge.net/projects/mingw-w64/


‫בתאריך יום ב׳, 20 במרץ 2017 ב-6:31 מאת ‪Constantine via cfe-dev‬‏ <‪[hidden email]‬‏>:‬
I can't get it to work, Clang 3.8, 3.9 and 4.0 appear to ignore PATH
environment variable and fail to find MinGW headers, while Clang 3.7
and 3.7.1 can find and use them just fine.

Anyone tried Clang 3.8+ versions with MinGW-w64?
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Anyone uses Clang 3.8 and higher on Windows with MinGW-w64?

Boris Kolpackov via cfe-dev

 Clang from official installer works if you copy "C:\mingw64\*" to "C:\Program Files\LLVM\".


P.S.

Use reply to all on LLVM mailing list.


------ Original Message ------
Subject: Re: [cfe-dev] Anyone uses Clang 3.8 and higher on Windows with MinGW-w64?
Date: Mon, 20 Mar 2017 18:38:40 +0300
To: Mateusz Mikuła
From: Constantine
Yaron, yes, I know it works, if I install Clang 3.7.0 or Clang 3.7.1
from llvm website it picks up a "C:\mingw64\bin" path from PATH env
variable, but when I replace them with Clang 3.8 or higher versions it
doesn't find the headers anymore and a basic hello world throws an
error that stdio.h can't be found.

Mateusz, thanks for reminding that MSYS2 has its own version of Clang!
Indeed, I installed Clang 3.9.1 and it works. Will stick with it for
now, just wanted to point out a possible issue with the official
installers.

On 3/20/17, Mateusz Mikuła [hidden email] wrote:
 It's far from being drop-in replacement for GCC.

At MSYS2 we have patched Clang working only a little better than
installed from LLVM website but there is still a lot to fix.


------ Original Message ------
Subject: Re: [cfe-dev] Anyone uses Clang 3.8 and higher on Windows with
MinGW-w64?
Date: Mon, 20 Mar 2017 09:57:38 +0000
To: Constantine, Cfe-dev
From: Yaron Keren Via Cfe-dev
clang works fine with mingw-builds from
https://sourceforge.net/projects/mingw-w64/


‫בתאריך יום ב׳, 20 במרץ 2017 ב-6:31 מאת ‪Constantine via cfe-dev‬‏
<‪[hidden email] [hidden email]‬‏>:‬

    I can't get it to work, Clang 3.8, 3.9 and 4.0 appear to ignore PATH
    environment variable and fail to find MinGW headers, while Clang 3.7
    and 3.7.1 can find and use them just fine.

    Anyone tried Clang 3.8+ versions with MinGW-w64?
    _______________________________________________
    cfe-dev mailing list
    [hidden email] [hidden email]
    http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev




_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Anyone uses Clang 3.8 and higher on Windows with MinGW-w64?

Boris Kolpackov via cfe-dev
Oh, I found what was the problem: Clang 3.8 and higher defaults to
x86_64-pc-windows-msvc target that straight up ignores MinGW headers,
but if I specify the mingw target in a compile command:

clang -target x86_64-w64-mingw32 main.c

It compiles fine, both for copied "C:\mingw64\*" in "C:\Program
Files\LLVM\" folder as Mateusz suggested or with respect to separate
mingw64 path from PATH env variable.

Solved!

On 3/20/17, Mateusz Mikuła <[hidden email]> wrote:

>  Clang from official installer works if you copy "C:\mingw64\*" to
> "C:\Program Files\LLVM\".
>
>
> P.S.
>
> Use reply to all on LLVM mailing list.
>
>
> ------ Original Message ------
> Subject: Re: [cfe-dev] Anyone uses Clang 3.8 and higher on Windows with
> MinGW-w64?
> Date: Mon, 20 Mar 2017 18:38:40 +0300
> To: Mateusz Mikuła
> From: Constantine
>> Yaron, yes, I know it works, if I install Clang 3.7.0 or Clang 3.7.1
>> from llvm website it picks up a "C:\mingw64\bin" path from PATH env
>> variable, but when I replace them with Clang 3.8 or higher versions it
>> doesn't find the headers anymore and a basic hello world throws an
>> error that stdio.h can't be found.
>>
>> Mateusz, thanks for reminding that MSYS2 has its own version of Clang!
>> Indeed, I installed Clang 3.9.1 and it works. Will stick with it for
>> now, just wanted to point out a possible issue with the official
>> installers.
>>
>> On 3/20/17, Mateusz Mikuła <[hidden email]> wrote:
>>>  It's far from being drop-in replacement for GCC.
>>>
>>> At MSYS2 we have patched Clang working only a little better than
>>> installed from LLVM website but there is still a lot to fix.
>>>
>>>
>>> ------ Original Message ------
>>> Subject: Re: [cfe-dev] Anyone uses Clang 3.8 and higher on Windows with
>>> MinGW-w64?
>>> Date: Mon, 20 Mar 2017 09:57:38 +0000
>>> To: Constantine, Cfe-dev
>>> From: Yaron Keren Via Cfe-dev
>>>> clang works fine with mingw-builds from
>>>> https://sourceforge.net/projects/mingw-w64/
>>>>
>>>>
>>>> ‫בתאריך יום ב׳, 20 במרץ 2017 ב-6:31 מאת ‪Constantine via cfe-dev‬‏
>>>> <‪[hidden email] <mailto:[hidden email]>‬‏>:‬
>>>>
>>>>     I can't get it to work, Clang 3.8, 3.9 and 4.0 appear to ignore
>>>> PATH
>>>>     environment variable and fail to find MinGW headers, while Clang
>>>> 3.7
>>>>     and 3.7.1 can find and use them just fine.
>>>>
>>>>     Anyone tried Clang 3.8+ versions with MinGW-w64?
>>>>     _______________________________________________
>>>>     cfe-dev mailing list
>>>>     [hidden email] <mailto:[hidden email]>
>>>>     http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> cfe-dev mailing list
>>>> [hidden email]
>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>>
>>
>
>

--
コンスタンティン・タラセンコフ

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

fuck-msvc.png (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Anyone uses Clang 3.8 and higher on Windows with MinGW-w64?

Boris Kolpackov via cfe-dev
If you want clang to default to mingw, it is easy to configure that way (-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-w64-mingw32 at cmake time). Or you can pass --target=x86_64-w64-mingw32 at runtime, and that will trigger mingw header search.

The upstream installer is built with MSVC, and LLVM targets whatever it was built with by default.

On Mon, Mar 20, 2017 at 9:10 AM, Constantine via cfe-dev <[hidden email]> wrote:
Oh, I found what was the problem: Clang 3.8 and higher defaults to
x86_64-pc-windows-msvc target that straight up ignores MinGW headers,
but if I specify the mingw target in a compile command:

clang -target x86_64-w64-mingw32 main.c

It compiles fine, both for copied "C:\mingw64\*" in "C:\Program
Files\LLVM\" folder as Mateusz suggested or with respect to separate
mingw64 path from PATH env variable.

Solved!

On 3/20/17, Mateusz Mikuła <[hidden email]> wrote:
>  Clang from official installer works if you copy "C:\mingw64\*" to
> "C:\Program Files\LLVM\".
>
>
> P.S.
>
> Use reply to all on LLVM mailing list.
>
>
> ------ Original Message ------
> Subject: Re: [cfe-dev] Anyone uses Clang 3.8 and higher on Windows with
> MinGW-w64?
> Date: Mon, 20 Mar 2017 18:38:40 +0300
> To: Mateusz Mikuła
> From: Constantine
>> Yaron, yes, I know it works, if I install Clang 3.7.0 or Clang 3.7.1
>> from llvm website it picks up a "C:\mingw64\bin" path from PATH env
>> variable, but when I replace them with Clang 3.8 or higher versions it
>> doesn't find the headers anymore and a basic hello world throws an
>> error that stdio.h can't be found.
>>
>> Mateusz, thanks for reminding that MSYS2 has its own version of Clang!
>> Indeed, I installed Clang 3.9.1 and it works. Will stick with it for
>> now, just wanted to point out a possible issue with the official
>> installers.
>>
>> On 3/20/17, Mateusz Mikuła <[hidden email]> wrote:
>>>  It's far from being drop-in replacement for GCC.
>>>
>>> At MSYS2 we have patched Clang working only a little better than
>>> installed from LLVM website but there is still a lot to fix.
>>>
>>>
>>> ------ Original Message ------
>>> Subject: Re: [cfe-dev] Anyone uses Clang 3.8 and higher on Windows with
>>> MinGW-w64?
>>> Date: Mon, 20 Mar 2017 09:57:38 +0000
>>> To: Constantine, Cfe-dev
>>> From: Yaron Keren Via Cfe-dev
>>>> clang works fine with mingw-builds from
>>>> https://sourceforge.net/projects/mingw-w64/
>>>>
>>>>
>>>> ‫בתאריך יום ב׳, 20 במרץ 2017 ב-6:31 מאת ‪Constantine via cfe-dev‬‏
>>>> <‪[hidden email] <mailto:[hidden email]>‬‏>:‬
>>>>
>>>>     I can't get it to work, Clang 3.8, 3.9 and 4.0 appear to ignore
>>>> PATH
>>>>     environment variable and fail to find MinGW headers, while Clang
>>>> 3.7
>>>>     and 3.7.1 can find and use them just fine.
>>>>
>>>>     Anyone tried Clang 3.8+ versions with MinGW-w64?
>>>>     _______________________________________________
>>>>     cfe-dev mailing list
>>>>     [hidden email] <mailto:[hidden email]>
>>>>     http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> cfe-dev mailing list
>>>> [hidden email]
>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>>
>>
>
>


--
コンスタンティン・タラセンコフ

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Anyone uses Clang 3.8 and higher on Windows with MinGW-w64?

Boris Kolpackov via cfe-dev
Reid, thanks for tip. I guess Clang 3.7 mislead me into thinking that
mingw headers should be searched by default since it works without
explicitly specifying mingw as the target.

On 3/20/17, Reid Kleckner <[hidden email]> wrote:

> If you want clang to default to mingw, it is easy to configure that way
> (-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-w64-mingw32 at cmake time). Or you can
> pass --target=x86_64-w64-mingw32 at runtime, and that will trigger mingw
> header search.
>
> The upstream installer is built with MSVC, and LLVM targets whatever it was
> built with by default.
>
> On Mon, Mar 20, 2017 at 9:10 AM, Constantine via cfe-dev <
> [hidden email]> wrote:
>
>> Oh, I found what was the problem: Clang 3.8 and higher defaults to
>> x86_64-pc-windows-msvc target that straight up ignores MinGW headers,
>> but if I specify the mingw target in a compile command:
>>
>> clang -target x86_64-w64-mingw32 main.c
>>
>> It compiles fine, both for copied "C:\mingw64\*" in "C:\Program
>> Files\LLVM\" folder as Mateusz suggested or with respect to separate
>> mingw64 path from PATH env variable.
>>
>> Solved!
>>
>> On 3/20/17, Mateusz Mikuła <[hidden email]> wrote:
>> >  Clang from official installer works if you copy "C:\mingw64\*" to
>> > "C:\Program Files\LLVM\".
>> >
>> >
>> > P.S.
>> >
>> > Use reply to all on LLVM mailing list.
>> >
>> >
>> > ------ Original Message ------
>> > Subject: Re: [cfe-dev] Anyone uses Clang 3.8 and higher on Windows with
>> > MinGW-w64?
>> > Date: Mon, 20 Mar 2017 18:38:40 +0300
>> > To: Mateusz Mikuła
>> > From: Constantine
>> >> Yaron, yes, I know it works, if I install Clang 3.7.0 or Clang 3.7.1
>> >> from llvm website it picks up a "C:\mingw64\bin" path from PATH env
>> >> variable, but when I replace them with Clang 3.8 or higher versions it
>> >> doesn't find the headers anymore and a basic hello world throws an
>> >> error that stdio.h can't be found.
>> >>
>> >> Mateusz, thanks for reminding that MSYS2 has its own version of Clang!
>> >> Indeed, I installed Clang 3.9.1 and it works. Will stick with it for
>> >> now, just wanted to point out a possible issue with the official
>> >> installers.
>> >>
>> >> On 3/20/17, Mateusz Mikuła <[hidden email]> wrote:
>> >>>  It's far from being drop-in replacement for GCC.
>> >>>
>> >>> At MSYS2 we have patched Clang working only a little better than
>> >>> installed from LLVM website but there is still a lot to fix.
>> >>>
>> >>>
>> >>> ------ Original Message ------
>> >>> Subject: Re: [cfe-dev] Anyone uses Clang 3.8 and higher on Windows
>> >>> with
>> >>> MinGW-w64?
>> >>> Date: Mon, 20 Mar 2017 09:57:38 +0000
>> >>> To: Constantine, Cfe-dev
>> >>> From: Yaron Keren Via Cfe-dev
>> >>>> clang works fine with mingw-builds from
>> >>>> https://sourceforge.net/projects/mingw-w64/
>> >>>>
>> >>>>
>> >>>> ‫בתאריך יום ב׳, 20 במרץ 2017 ב-6:31 מאת ‪Constantine via cfe-dev‬‏
>> >>>> <‪[hidden email] <mailto:[hidden email]>‬‏>:‬
>> >>>>
>> >>>>     I can't get it to work, Clang 3.8, 3.9 and 4.0 appear to ignore
>> >>>> PATH
>> >>>>     environment variable and fail to find MinGW headers, while Clang
>> >>>> 3.7
>> >>>>     and 3.7.1 can find and use them just fine.
>> >>>>
>> >>>>     Anyone tried Clang 3.8+ versions with MinGW-w64?
>> >>>>     _______________________________________________
>> >>>>     cfe-dev mailing list
>> >>>>     [hidden email] <mailto:[hidden email]>
>> >>>>     http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>> >>>>
>> >>>>
>> >>>>
>> >>>> _______________________________________________
>> >>>> cfe-dev mailing list
>> >>>> [hidden email]
>> >>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>> >>>
>> >>
>> >
>> >
>>
>>
>> --
>> コンスタンティン・タラセンコフ
>>
>> _______________________________________________
>> cfe-dev mailing list
>> [hidden email]
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>
>>
>


--
コンスタンティン・タラセンコフ
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev