Lines Matching full:code
28 This document focuses on the <code>gc</code> Go
30 For information on how to work on <code>gccgo</code>, a more traditional
43 <code>amd64</code> (also known as <code>x86-64</code>)
47 optimizer (registerizer) and generates good code (although
48 <code>gccgo</code> can do noticeably better sometimes).
51 <code>386</code> (<code>x86</code> or <code>x86-32</code>)
54 Comparable to the <code>amd64</code> port.
57 <code>arm</code> (<code>ARM</code>)
63 <code>arm64</code> (<code>AArch64</code>)
69 <code>ppc64, ppc64le</code> (64-bit PowerPC big- and little-endian)
77 Except for things like low-level operating system interface code, the run-time
97 chain in <code>$HOME/go1.4</code>.
98 (This path may be overridden by setting the <code>GOROOT_BOOTSTRAP</code>
109 <code>$HOME/go1.4</code> (or your nominated <code>GOROOT_BOOTSTRAP</code>
115 as <code>linux/ppc64</code>) you can either use
129 <code>bootstrap.bash</code> cross-compiles a toolchain for that <code>GOOS/GOARCH</code>
130 combination, leaving the resulting tree in <code>../../go-${GOOS}-${GOARCH}-bootstrap</code>.
132 and used as <code>GOROOT_BOOTSTRAP</code> to bootstrap a local build.
136 To use gccgo, you need to arrange for <code>$GOROOT_BOOSTRAP/bin/go</code> to be
150 have a <code>git</code> command before proceeding.)
162 <p>Go will install to a directory named <code>go</code>.
164 and make sure the <code>go</code> directory does not exist.
175 <p>If you intend to modify the go source code, and
197 (To build under Windows use <code>all.bat</code>.)
222 <code>all.bash</code> (or <code>all.bat</code>) runs important tests for Go,
224 the test suite use <code>make.bash</code> (or <code>make.bat</code>)
237 Create a file named <code>hello.go</code> and put the following program in it:
251 Then run it with the <code>go</code> tool:
271 <a href="/doc/code.html" class="download" id="start">
272 <span class="big">How to Write Go Code</span>
278 The <a href="/doc/code.html">How to Write Go Code</a> document
286 The source code for several Go tools (including <a href="/cmd/godoc/">godoc</a>)
288 To install all of them, run the <code>go</code> <code>get</code> command:
296 Or if you just want to install a specific command (<code>godoc</code> in this case):
304 To install these tools, the <code>go</code> <code>get</code> command requires
309 You must also have a workspace (<code>GOPATH</code>) set up;
310 see <a href="/doc/code.html">How to Write Go Code</a> for the details.
314 <b>Note</b>: The <code>go</code> command will install the <code>godoc</code>
315 binary to <code>$GOROOT/bin</code> (or <code>$GOBIN</code>) and the
316 <code>cover</code> and <code>vet</code> binaries to
317 <code>$GOROOT/pkg/tool/$GOOS_$GOARCH</code>.
319 "<code>go</code> <code>tool</code> <code>cover</code>" and
320 "<code>go</code> <code>tool</code> <code>vet</code>".
327 <code>#go-nuts</code> on the <a href="http://freenode.net/">Freenode</a> IRC server
349 <code>go1.5</code>.
363 Where <code><tag></code> is the version string of the release.
375 <li><code>$GOROOT</code>
377 The root of the Go tree, often <code>$HOME/go</code>.
379 defaults to the parent of the directory where <code>all.bash</code> was run.
384 <li><code>$GOROOT_FINAL</code>
387 <code>$GOROOT</code> is not set explicitly.
388 It defaults to the value of <code>$GOROOT</code>.
391 <code>$GOROOT_FINAL</code> to the eventual location.
394 <li><code>$GOOS</code> and <code>$GOARCH</code>
397 These default to the values of <code>$GOHOSTOS</code> and
398 <code>$GOHOSTARCH</code> respectively (described below).
401 Choices for <code>$GOOS</code> are
402 <code>darwin</code> (Mac OS X 10.7 and above and iOS), <code>dragonfly</code>, <code>freebsd</code>,
403 <code>linux</code>, <code>netbsd</code>, <code>openbsd</code>,
404 <code>plan9</code>, <code>solaris</code> and <code>windows</code>.
405 Choices for <code>$GOARCH</code> are
406 <code>amd64</code> (64-bit x86, the most mature port),
407 <code>386</code> (32-bit x86), <code>arm</code> (32-bit ARM), <code>arm64</code> (64-bit ARM),
408 <code>ppc64le</code> (PowerPC 64-bit, little-endian), and <code>ppc64</code> (PowerPC 64-bit, big-endian).
409 The valid combinations of <code>$GOOS</code> and <code>$GOARCH</code> are:
412 <th width="50"></th><th align="left" width="100"><code>$GOOS</code></th> <th align="left" width="100"><code>$GOARCH</code></th>
415 <td></td><td><code>darwin</code></td> <td><code>386</code></td>
418 <td></td><td><code>darwin</code></td> <td><code>amd64</code></td>
421 <td></td><td><code>darwin</code></td> <td><code>arm</code></td>
424 <td></td><td><code>darwin</code></td> <td><code>arm64</code></td>
427 <td></td><td><code>dragonfly</code></td> <td><code>amd64</code></td>
430 <td></td><td><code>freebsd</code></td> <td><code>386</code></td>
433 <td></td><td><code>freebsd</code></td> <td><code>amd64</code></td>
436 <td></td><td><code>freebsd</code></td> <td><code>arm</code></td>
439 <td></td><td><code>linux</code></td> <td><code>386</code></td>
442 <td></td><td><code>linux</code></td> <td><code>amd64</code></td>
445 <td></td><td><code>linux</code></td> <td><code>arm</code></td>
448 <td></td><td><code>linux</code></td> <td><code>arm64</code></td>
451 <td></td><td><code>linux</code></td> <td><code>ppc64</code></td>
454 <td></td><td><code>linux</code></td> <td><code>ppc64le</code></td>
457 <td></td><td><code>netbsd</code></td> <td><code>386</code></td>
460 <td></td><td><code>netbsd</code></td> <td><code>amd64</code></td>
463 <td></td><td><code>netbsd</code></td> <td><code>arm</code></td>
466 <td></td><td><code>openbsd</code></td> <td><code>386</code></td>
469 <td></td><td><code>openbsd</code></td> <td><code>amd64</code></td>
472 <td></td><td><code>openbsd</code></td> <td><code>arm</code></td>
475 <td></td><td><code>plan9</code></td> <td><code>386</code></td>
478 <td></td><td><code>plan9</code></td> <td><code>amd64</code></td>
481 <td></td><td><code>solaris</code></td> <td><code>amd64</code></td>
484 <td></td><td><code>windows</code></td> <td><code>386</code></td>
487 <td></td><td><code>windows</code></td> <td><code>amd64</code></td>
492 <li><code>$GOHOSTOS</code> and <code>$GOHOSTARCH</code>
500 Valid choices are the same as for <code>$GOOS</code> and
501 <code>$GOARCH</code>, listed above.
503 For example, you should not set <code>$GOHOSTARCH</code> to
504 <code>arm</code> on an x86 system.
507 <li><code>$GOBIN</code>
510 The default is <code>$GOROOT/bin</code>.
512 directory to your <code>$PATH</code>, so you can use the tools.
513 If <code>$GOBIN</code> is set, the <a href="/cmd/go">go command</a>
517 <li><code>$GO386</code> (for <code>386</code> only, default is auto-detected
518 if built on either <code>386</code> or <code>amd64</code>, <code>387</code> otherwise)
520 This controls the code generated by gc to use either the 387 floating-point unit
521 (set to <code>387</code>) or SSE2 instructions (set to <code>sse2</code>) for
525 <li><code>GO386=387</code>: use x87 for floating point operations; should support all x86 chips (Pentium MMX or later).
526 <li><code>GO386=sse2</code>: use SSE2 for floating point operations; has better performance than 387, but only available on Pentium 4/Opteron/Athlon 64 or later.
529 <li><code>$GOARM</code> (for <code>arm</code> only; default is auto-detected if building
536 <li><code>GOARM=5</code>: use software floating point; when CPU doesn't have VFP co-processor
537 <li><code>GOARM=6</code>: use VFPv1 only; default if cross compiling; usually ARM11 or better cores (VFPv2 or better is also supported)
538 <li><code>GOARM=7</code>: use VFPv3; usually Cortex-A cores
551 Note that <code>$GOARCH</code> and <code>$GOOS</code> identify the
557 must set <code>GOARCH</code> to <code>386</code>,
558 not <code>amd64</code>.
563 set these variables in your shell profile (<code>$HOME/.bashrc</code>,
564 <code>$HOME/.profile</code>, or equivalent). The settings might look