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