<div dir="ltr">Just to clarify (not sure if it's needed): Note that I can run Xcode with my custom toolchain, eg:<div>xcrun launch-with-toolchain ./swift-SNAPSHOT-2015-12-11-a.xctoolchain<br></div><div><br></div><div>What I want to know is the part about switching between the command line tools, not only between my Xcode and Xcode-beta (which I can do using xcode-select) but also between those and my custom built Swift.</div><div><br></div><div>/Jens</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 6:47 AM, Dmitri Gribenko <span dir="ltr"><<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Mish Awadah probably knows about setting up a custom toolchain in Xcode.<br>
<span class="HOEnZb"><font color="#888888"><br>
Dmitri<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Thu, Dec 10, 2015 at 9:44 PM, Jens Persson <<a href="mailto:jens@bitcycle.com">jens@bitcycle.com</a>> wrote:<br>
> Thanks again,<br>
> I pulled the latest Swift repos which included the fix of the failing test<br>
> and modified the build preset locally according to Dmitri's advice and the<br>
> build completes without problems.<br>
><br>
> But now I wonder if there is a way to switch between the command line tools<br>
> of Xcode, Xcode-beta and the Swift I've just built from sources?<br>
><br>
> I mean, when I want to switch between the command line tools of Xcode and<br>
> Xcode-beta I can simply do:<br>
> sudo xcode-select -s /Applications/Xcode[-beta].app<br>
><br>
> Is there something similar that I can do in order to switch to the command<br>
> line tools from the one I built from sources?<br>
><br>
> These instructions: <a href="https://swift.org/download/" rel="noreferrer" target="_blank">https://swift.org/download/</a><br>
> just says "add the Swift toolchain to your path" (using export) but I'm<br>
> hesitant to do that since I don't know whether that will work when I already<br>
> have Xcode and Xcode-beta installed (and thus /usr/bin/swiftc etc)?<br>
><br>
> /Jens<br>
><br>
><br>
> On Thu, Dec 10, 2015 at 6:11 PM, Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>><br>
> wrote:<br>
>><br>
>> On Thu, Dec 10, 2015 at 7:41 AM, Jens Persson <<a href="mailto:jens@bitcycle.com">jens@bitcycle.com</a>> wrote:<br>
>> > Thanks!<br>
>> > I tried the above to compile with the buildbot_osx_package preset. It<br>
>> > kind<br>
>> > of worked, but it failed while performing the tests.<br>
>> > (TEST 'Swift :: Driver/Dependencies/bindings-build-record.swift' FAILED)<br>
>> > So, I got a working swiftc etc but no package or toolchain or anything<br>
>> > (at<br>
>> > least as far as I could see).<br>
>> ><br>
>> > However, trying out the resulting swiftc shows that it is slow, ie the<br>
>> > buildbot_osx_package preset did not imply --no-assertions<br>
>> > --no-swift-stdlib-assertions.<br>
>><br>
>> Jens,<br>
>><br>
>> I think you found an issue in our presets. I filed<br>
>> <a href="https://bugs.swift.org/browse/SR-180" rel="noreferrer" target="_blank">https://bugs.swift.org/browse/SR-180</a> Here, we have an incorrect<br>
>> workaround that causes this issue:<br>
>><br>
>> [preset: mixin_lightweight_assertions]<br>
>> assertions<br>
>><br>
>> # FIXME: This should be:<br>
>> # no-assertions<br>
>> # swift-assertions<br>
>> # ... but our tests are expecting assertions to be either on or off<br>
>> everywhere.<br>
>><br>
>> I think this hacky patch should get you unblocked (untested!):<br>
>><br>
>><br>
>> -------------------------------------------------------------------------------------<br>
>> diff --git a/utils/build-presets.ini b/utils/build-presets.ini<br>
>> index 6dc6d24..1ab441f 100644<br>
>> --- a/utils/build-presets.ini<br>
>> +++ b/utils/build-presets.ini<br>
>> @@ -462,12 +462,8 @@ swift-runtime-enable-leak-checker=1<br>
>> # A mixin that enables 'lightweight' assertions that don't slow down the<br>
>> # compiler significantly.<br>
>> [preset: mixin_lightweight_assertions]<br>
>> -assertions<br>
>> -<br>
>> -# FIXME: This should be:<br>
>> -# no-assertions<br>
>> -# swift-assertions<br>
>> -# ... but our tests are expecting assertions to be either on or off<br>
>> everywhere.<br>
>> +no-assertions<br>
>> +swift-assertions<br>
>><br>
>> dash-dash<br>
>><br>
>> @@ -592,8 +588,6 @@ build-subdir=buildbot_osx<br>
>> ios<br>
>> tvos<br>
>> watchos<br>
>> -test<br>
>> -validation-test<br>
>><br>
>> dash-dash<br>
>><br>
>> -------------------------------------------------------------------------------------<br>
>><br>
>> Dmitri<br>
>><br>
>> --<br>
>> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if<br>
>> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>>*/<br>
><br>
><br>
><br>
><br>
> --<br>
> bitCycle AB | Smedjegatan 12 | 742 32 Östhammar | Sweden<br>
> <a href="http://www.bitcycle.com/" rel="noreferrer" target="_blank">http://www.bitcycle.com/</a><br>
> Phone: +46-73-753 24 62<br>
> E-mail: <a href="mailto:jens@bitcycle.com">jens@bitcycle.com</a><br>
><br>
<br>
<br>
<br>
--<br>
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if<br>
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>>*/<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">bitCycle AB | Smedjegatan 12 | 742 32 Östhammar | Sweden<br><a href="http://www.bitcycle.com/" target="_blank">http://www.bitcycle.com/</a><br>Phone: +46-73-753 24 62<br>E-mail: <a href="mailto:jens@bitcycle.com" target="_blank">jens@bitcycle.com</a><br><br></div>
</div>