Choosing clang toolset on Windows

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

Choosing clang toolset on Windows

Boost - Build mailing list
If I have on Windows in my user-config.jam

import toolset ;
using clang-win : 8.0 : E:/programming/bat/cp_clangwin80.bat : etc. ;
using clang : 8.0 : E:/programming/bat/cp_clang80.bat : etc. ;

and my invoocation is:

b2 toolset=clang-8.0 somejam.jam

the clang-win toolset is chosen to compile/link the tests in somejam.jam
instead of the clang toolset. I realize I can solve this by changing the
clang toolset to clang-linux, and then invoking b2 as:

b2 toolset=clang-linux-8.0 somejam.jam

but why should I have to do this ?

If I just have in my user-config.jam

import toolset ;
using clang : 8.0 : E:/programming/bat/cp_clang80.bat : etc. ;

then

b2 toolset=clang-8.0 somejam.jam

does use the toolset I have.


_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Choosing clang toolset on Windows

Boost - Build mailing list
AMDG

On 7/22/19 8:17 PM, Edward Diener via Boost-build wrote:
> If I have on Windows in my user-config.jam
>
> import toolset ;
> using clang-win : 8.0 : E:/programming/bat/cp_clangwin80.bat : etc. ;
> using clang : 8.0 : E:/programming/bat/cp_clang80.bat : etc. ;
>

Flip the order.  `using clang` is the same as `using clang-linux`
The first one listed is the default.

> and my invoocation is:
>
> b2 toolset=clang-8.0 somejam.jam
>
> the clang-win toolset is chosen to compile/link the tests in somejam.jam
> instead of the clang toolset. I realize I can solve this by changing the
> clang toolset to clang-linux, and then invoking b2 as:
>
> b2 toolset=clang-linux-8.0 somejam.jam
>
> but why should I have to do this ?
>
> If I just have in my user-config.jam
>
> import toolset ;
> using clang : 8.0 : E:/programming/bat/cp_clang80.bat : etc. ;
>
> then
>
> b2 toolset=clang-8.0 somejam.jam
>
> does use the toolset I have.
>

In Christ,
Steven Watanabe
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Choosing clang toolset on Windows

Boost - Build mailing list
On 7/23/2019 6:17 AM, Steven Watanabe via Boost-build wrote:

> AMDG
>
> On 7/22/19 8:17 PM, Edward Diener via Boost-build wrote:
>> If I have on Windows in my user-config.jam
>>
>> import toolset ;
>> using clang-win : 8.0 : E:/programming/bat/cp_clangwin80.bat : etc. ;
>> using clang : 8.0 : E:/programming/bat/cp_clang80.bat : etc. ;
>>
>
> Flip the order.  `using clang` is the same as `using clang-linux`
> The first one listed is the default.
>

Ok, thanks ! But why does a 'default' matter when the two toolsets above
are different ?

Does not that mean that if I flip them that 'b2 toolset=clang-win-8.0'
chooses the 'clang' toolset over the 'clang-win' toolset if the first
one listed is the default from what you are saying ? This is not what I
want.

Like I said if I change the 'clang' toolset definition to 'clang-linux',
then invoking 'b2 toolset=clang-linux' or 'b2 toolset=clang-win' chooses
the correct toolset, but I do not understand why it should not work as
above. I guess I hate to have to type the extra letters of 'clang-linux'
as opposed to just 'clang' when it seems it should work as is.

>> and my invoocation is:
>>
>> b2 toolset=clang-8.0 somejam.jam
>>
>> the clang-win toolset is chosen to compile/link the tests in somejam.jam
>> instead of the clang toolset. I realize I can solve this by changing the
>> clang toolset to clang-linux, and then invoking b2 as:
>>
>> b2 toolset=clang-linux-8.0 somejam.jam
>>
>> but why should I have to do this ?
>>
>> If I just have in my user-config.jam
>>
>> import toolset ;
>> using clang : 8.0 : E:/programming/bat/cp_clang80.bat : etc. ;
>>
>> then
>>
>> b2 toolset=clang-8.0 somejam.jam
>>
>> does use the toolset I have.
>>

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Choosing clang toolset on Windows

Boost - Build mailing list
AMDG

On 7/23/19 6:23 AM, Edward Diener via Boost-build wrote:

> On 7/23/2019 6:17 AM, Steven Watanabe via Boost-build wrote:
>> On 7/22/19 8:17 PM, Edward Diener via Boost-build wrote:
>>> If I have on Windows in my user-config.jam
>>>
>>> import toolset ;
>>> using clang-win : 8.0 : E:/programming/bat/cp_clangwin80.bat : etc. ;
>>> using clang : 8.0 : E:/programming/bat/cp_clang80.bat : etc. ;
>>>
>>
>> Flip the order.  `using clang` is the same as `using clang-linux`
>> The first one listed is the default.
>>
>
> Ok, thanks ! But why does a 'default' matter when the two toolsets above
> are different ?
>
> Does not that mean that if I flip them that 'b2 toolset=clang-win-8.0'
> chooses the 'clang' toolset over the 'clang-win' toolset

It's impossible to have a `clang` toolset.  It's always
clang-win, clang-linux, clang-darwin, etc.  When you say
`using clang` it will always pick one of these based on
your platform.

When you specify toolset=clang, Boost.Build will fill in
the version and platform with the first ones specified.
If you specify the version or platform explicitly, then
you get whatever you asked for.

In short, your setup above has:
toolset=clang -> clang-win-8.0
toolset=clang-win -> clang-win-8.0
toolset=clang-linux -> clang-linux-8.0

What you are asking for is:
toolset=clang -> clang-linux-8.0
which can be achieved by putting `using clang` before
`using clang-win.`

> if the first
> one listed is the default from what you are saying ? This is not what I
> want.
>
> Like I said if I change the 'clang' toolset definition to 'clang-linux',
> then invoking 'b2 toolset=clang-linux'

You don't need to change the definition to clang-linux.  You can
use toolset=clang-linux with your current setup.

> or 'b2 toolset=clang-win' chooses
> the correct toolset, but I do not understand why it should not work as
> above. I guess I hate to have to type the extra letters of 'clang-linux'
> as opposed to just 'clang' when it seems it should work as is.
>

In Christ,
Steven Watanabe
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build