Is it possible to build go1.6 with go1.6 or versions other than go1.4?

agolangf · · 767 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p><a href="https://golang.org/doc/install/source#go14">https://golang.org/doc/install/source#go14</a></p> <p>The official pages doesn&#39;t provide information regarding this. Any idea?</p> <hr/>**评论:**<br/><br/>joushou: <pre><p>Yes, you can. 1.4 is the minimum requirement to build the bootstrapping toolchain. Feel free to use 1.6.2 or even tip. Just set GOROOT_BOOTSTRAP to wherever you have a version of Go &gt;=1.4.</p> <p>Note that your local version of Go only compiles a bootstrap toolchain. It isn&#39;t used to compile the final toolchain. This way, your local version of Go has no effect on the final compiler - it can at most affect the time it takes to execute the first step of the toolchain building process (Unless you&#39;re on plan9, where pre-1.6.2 was buggy and could crash before a successful bootstrap).</p></pre>OryBand: <pre><p>Thanks.</p> <p>So does this mean there aren&#39;t any performance difference regarding go tools (build, get, etc.) between building go1.6 from go1.4 or from go1.6?</p></pre>dominikh: <pre><p>Correct.</p></pre>scaevolus: <pre><p>Right, since it&#39;s </p> <ol> <li>compile src with go 1.4</li> <li>compile src with compiler built in previous step</li> </ol></pre>dmikalova: <pre><p>How does the bootstrap toolchain work?</p></pre>joushou: <pre><p>Well, it builds the compiler and its dependencies into what they call the bootstrap toolchain, then it uses this to build the compiler again, including all tools.</p> <p>It basically just builds the toolchain twice to ensure that you have a fast compiler as well.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

767 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传