Hex Artifact Content
Not logged in

Artifact d915b0490e758fdd135898756aec98f46eb90a9c:


0000: 23 20 53 61 6d 70 6c 65 20 54 4f 4d 4c 20 63 6f  # Sample TOML co
0010: 6e 66 69 67 75 72 61 74 69 6f 6e 20 66 69 6c 65  nfiguration file
0020: 20 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 52 75   for building Ru
0030: 73 74 2e 0a 23 0a 23 20 54 6f 20 63 6f 6e 66 69  st..#.# To confi
0040: 67 75 72 65 20 72 75 73 74 62 75 69 6c 64 2c 20  gure rustbuild, 
0050: 63 6f 70 79 20 74 68 69 73 20 66 69 6c 65 20 74  copy this file t
0060: 6f 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 20  o the directory 
0070: 66 72 6f 6d 20 77 68 69 63 68 20 79 6f 75 20 77  from which you w
0080: 69 6c 6c 20 62 65 0a 23 20 72 75 6e 6e 69 6e 67  ill be.# running
0090: 20 74 68 65 20 62 75 69 6c 64 2c 20 61 6e 64 20   the build, and 
00a0: 6e 61 6d 65 20 69 74 20 63 6f 6e 66 69 67 2e 74  name it config.t
00b0: 6f 6d 6c 2e 0a 23 0a 23 20 41 6c 6c 20 6f 70 74  oml..#.# All opt
00c0: 69 6f 6e 73 20 61 72 65 20 63 6f 6d 6d 65 6e 74  ions are comment
00d0: 65 64 20 6f 75 74 20 62 79 20 64 65 66 61 75 6c  ed out by defaul
00e0: 74 20 69 6e 20 74 68 69 73 20 66 69 6c 65 2c 20  t in this file, 
00f0: 61 6e 64 20 74 68 65 79 27 72 65 20 63 6f 6d 6d  and they're comm
0100: 65 6e 74 65 64 0a 23 20 6f 75 74 20 77 69 74 68  ented.# out with
0110: 20 74 68 65 69 72 20 64 65 66 61 75 6c 74 20 76   their default v
0120: 61 6c 75 65 73 2e 20 54 68 65 20 62 75 69 6c 64  alues. The build
0130: 20 73 79 73 74 65 6d 20 62 79 20 64 65 66 61 75   system by defau
0140: 6c 74 20 6c 6f 6f 6b 73 20 66 6f 72 0a 23 20 60  lt looks for.# `
0150: 63 6f 6e 66 69 67 2e 74 6f 6d 6c 60 20 69 6e 20  config.toml` in 
0160: 74 68 65 20 63 75 72 72 65 6e 74 20 64 69 72 65  the current dire
0170: 63 74 6f 72 79 20 6f 66 20 61 20 62 75 69 6c 64  ctory of a build
0180: 20 66 6f 72 20 62 75 69 6c 64 20 63 6f 6e 66 69   for build confi
0190: 67 75 72 61 74 69 6f 6e 2c 20 62 75 74 0a 23 20  guration, but.# 
01a0: 61 20 63 75 73 74 6f 6d 20 63 6f 6e 66 69 67 75  a custom configu
01b0: 72 61 74 69 6f 6e 20 66 69 6c 65 20 63 61 6e 20  ration file can 
01c0: 61 6c 73 6f 20 62 65 20 73 70 65 63 69 66 69 65  also be specifie
01d0: 64 20 77 69 74 68 20 60 2d 2d 63 6f 6e 66 69 67  d with `--config
01e0: 60 20 74 6f 20 74 68 65 20 62 75 69 6c 64 0a 23  ` to the build.#
01f0: 20 73 79 73 74 65 6d 2e 0a 0a 23 20 3d 3d 3d 3d   system...# ====
0200: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0210: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0220: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0230: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0240: 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a 23 20 54 77 65 61  =========.# Twea
0250: 6b 69 6e 67 20 68 6f 77 20 4c 4c 56 4d 20 69 73  king how LLVM is
0260: 20 63 6f 6d 70 69 6c 65 64 0a 23 20 3d 3d 3d 3d   compiled.# ====
0270: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0280: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
0290: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
02a0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
02b0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a 5b 6c 6c 76 6d 5d  =========.[llvm]
02c0: 0a 0a 23 20 49 6e 64 69 63 61 74 65 73 20 77 68  ..# Indicates wh
02d0: 65 74 68 65 72 20 74 68 65 20 4c 4c 56 4d 20 62  ether the LLVM b
02e0: 75 69 6c 64 20 69 73 20 61 20 52 65 6c 65 61 73  uild is a Releas
02f0: 65 20 6f 72 20 44 65 62 75 67 20 62 75 69 6c 64  e or Debug build
0300: 0a 23 6f 70 74 69 6d 69 7a 65 20 3d 20 74 72 75  .#optimize = tru
0310: 65 0a 0a 23 20 49 6e 64 69 63 61 74 65 73 20 77  e..# Indicates w
0320: 68 65 74 68 65 72 20 4c 4c 56 4d 20 73 68 6f 75  hether LLVM shou
0330: 6c 64 20 62 65 20 62 75 69 6c 74 20 77 69 74 68  ld be built with
0340: 20 54 68 69 6e 4c 54 4f 2e 20 4e 6f 74 65 20 74   ThinLTO. Note t
0350: 68 61 74 20 74 68 69 73 20 77 69 6c 6c 0a 23 20  hat this will.# 
0360: 6f 6e 6c 79 20 73 75 63 63 65 65 64 20 69 66 20  only succeed if 
0370: 79 6f 75 20 75 73 65 20 63 6c 61 6e 67 2c 20 6c  you use clang, l
0380: 6c 64 2c 20 6c 6c 76 6d 2d 61 72 2c 20 61 6e 64  ld, llvm-ar, and
0390: 20 6c 6c 76 6d 2d 72 61 6e 6c 69 62 20 69 6e 20   llvm-ranlib in 
03a0: 79 6f 75 72 20 43 2f 43 2b 2b 0a 23 20 74 6f 6f  your C/C++.# too
03b0: 6c 63 68 61 69 6e 20 28 73 65 65 20 74 68 65 20  lchain (see the 
03c0: 60 63 63 60 2c 20 60 63 78 78 60 2c 20 60 6c 69  `cc`, `cxx`, `li
03d0: 6e 6b 65 72 60 2c 20 60 61 72 60 2c 20 61 6e 64  nker`, `ar`, and
03e0: 20 60 72 61 6e 6c 69 62 60 20 6f 70 74 69 6f 6e   `ranlib` option
03f0: 73 20 62 65 6c 6f 77 29 2e 0a 23 20 4d 6f 72 65  s below)..# More
0400: 20 69 6e 66 6f 20 61 74 3a 20 68 74 74 70 73 3a   info at: https:
0410: 2f 2f 63 6c 61 6e 67 2e 6c 6c 76 6d 2e 6f 72 67  //clang.llvm.org
0420: 2f 64 6f 63 73 2f 54 68 69 6e 4c 54 4f 2e 68 74  /docs/ThinLTO.ht
0430: 6d 6c 23 63 6c 61 6e 67 2d 62 6f 6f 74 73 74 72  ml#clang-bootstr
0440: 61 70 0a 23 74 68 69 6e 2d 6c 74 6f 20 3d 20 66  ap.#thin-lto = f
0450: 61 6c 73 65 0a 0a 23 20 49 6e 64 69 63 61 74 65  alse..# Indicate
0460: 73 20 77 68 65 74 68 65 72 20 61 6e 20 4c 4c 56  s whether an LLV
0470: 4d 20 52 65 6c 65 61 73 65 20 62 75 69 6c 64 20  M Release build 
0480: 73 68 6f 75 6c 64 20 69 6e 63 6c 75 64 65 20 64  should include d
0490: 65 62 75 67 20 69 6e 66 6f 0a 23 72 65 6c 65 61  ebug info.#relea
04a0: 73 65 2d 64 65 62 75 67 69 6e 66 6f 20 3d 20 66  se-debuginfo = f
04b0: 61 6c 73 65 0a 0a 23 20 49 6e 64 69 63 61 74 65  alse..# Indicate
04c0: 73 20 77 68 65 74 68 65 72 20 74 68 65 20 4c 4c  s whether the LL
04d0: 56 4d 20 61 73 73 65 72 74 69 6f 6e 73 20 61 72  VM assertions ar
04e0: 65 20 65 6e 61 62 6c 65 64 20 6f 72 20 6e 6f 74  e enabled or not
04f0: 0a 23 61 73 73 65 72 74 69 6f 6e 73 20 3d 20 66  .#assertions = f
0500: 61 6c 73 65 0a 0a 23 20 49 6e 64 69 63 61 74 65  alse..# Indicate
0510: 73 20 77 68 65 74 68 65 72 20 63 63 61 63 68 65  s whether ccache
0520: 20 69 73 20 75 73 65 64 20 77 68 65 6e 20 62 75   is used when bu
0530: 69 6c 64 69 6e 67 20 4c 4c 56 4d 0a 23 63 63 61  ilding LLVM.#cca
0540: 63 68 65 20 3d 20 66 61 6c 73 65 0a 23 20 6f 72  che = false.# or
0550: 20 61 6c 74 65 72 6e 61 74 69 76 65 6c 79 20 2e   alternatively .
0560: 2e 2e 0a 23 63 63 61 63 68 65 20 3d 20 22 2f 70  ...#ccache = "/p
0570: 61 74 68 2f 74 6f 2f 63 63 61 63 68 65 22 0a 0a  ath/to/ccache"..
0580: 23 20 49 66 20 61 6e 20 65 78 74 65 72 6e 61 6c  # If an external
0590: 20 4c 4c 56 4d 20 72 6f 6f 74 20 69 73 20 73 70   LLVM root is sp
05a0: 65 63 69 66 69 65 64 2c 20 77 65 20 61 75 74 6f  ecified, we auto
05b0: 6d 61 74 69 63 61 6c 6c 79 20 63 68 65 63 6b 20  matically check 
05c0: 74 68 65 20 76 65 72 73 69 6f 6e 20 62 79 0a 23  the version by.#
05d0: 20 64 65 66 61 75 6c 74 20 74 6f 20 6d 61 6b 65   default to make
05e0: 20 73 75 72 65 20 69 74 27 73 20 77 69 74 68 69   sure it's withi
05f0: 6e 20 74 68 65 20 72 61 6e 67 65 20 74 68 61 74  n the range that
0600: 20 77 65 27 72 65 20 65 78 70 65 63 74 69 6e 67   we're expecting
0610: 2c 20 62 75 74 20 73 65 74 74 69 6e 67 0a 23 20  , but setting.# 
0620: 74 68 69 73 20 66 6c 61 67 20 77 69 6c 6c 20 69  this flag will i
0630: 6e 64 69 63 61 74 65 20 74 68 61 74 20 74 68 69  ndicate that thi
0640: 73 20 76 65 72 73 69 6f 6e 20 63 68 65 63 6b 20  s version check 
0650: 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65 20 64 6f  should not be do
0660: 6e 65 2e 0a 23 76 65 72 73 69 6f 6e 2d 63 68 65  ne..#version-che
0670: 63 6b 20 3d 20 74 72 75 65 0a 0a 23 20 4c 69 6e  ck = true..# Lin
0680: 6b 20 6c 69 62 73 74 64 63 2b 2b 20 73 74 61 74  k libstdc++ stat
0690: 69 63 61 6c 6c 79 20 69 6e 74 6f 20 74 68 65 20  ically into the 
06a0: 6c 69 62 72 75 73 74 63 5f 6c 6c 76 6d 20 69 6e  librustc_llvm in
06b0: 73 74 65 61 64 20 6f 66 20 72 65 6c 79 69 6e 67  stead of relying
06c0: 20 6f 6e 20 61 0a 23 20 64 79 6e 61 6d 69 63 20   on a.# dynamic 
06d0: 76 65 72 73 69 6f 6e 20 74 6f 20 62 65 20 61 76  version to be av
06e0: 61 69 6c 61 62 6c 65 2e 0a 23 73 74 61 74 69 63  ailable..#static
06f0: 2d 6c 69 62 73 74 64 63 70 70 20 3d 20 66 61 6c  -libstdcpp = fal
0700: 73 65 0a 0a 23 20 54 65 6c 6c 20 74 68 65 20 4c  se..# Tell the L
0710: 4c 56 4d 20 62 75 69 6c 64 20 73 79 73 74 65 6d  LVM build system
0720: 20 74 6f 20 75 73 65 20 4e 69 6e 6a 61 20 69 6e   to use Ninja in
0730: 73 74 65 61 64 20 6f 66 20 74 68 65 20 70 6c 61  stead of the pla
0740: 74 66 6f 72 6d 20 64 65 66 61 75 6c 74 20 66 6f  tform default fo
0750: 72 0a 23 20 74 68 65 20 67 65 6e 65 72 61 74 65  r.# the generate
0760: 64 20 62 75 69 6c 64 20 73 79 73 74 65 6d 2e 20  d build system. 
0770: 54 68 69 73 20 63 61 6e 20 73 6f 6d 65 74 69 6d  This can sometim
0780: 65 73 20 62 65 20 66 61 73 74 65 72 20 74 68 61  es be faster tha
0790: 6e 20 6d 61 6b 65 2c 20 66 6f 72 0a 23 20 65 78  n make, for.# ex
07a0: 61 6d 70 6c 65 2e 0a 23 6e 69 6e 6a 61 20 3d 20  ample..#ninja = 
07b0: 66 61 6c 73 65 0a 0a 23 20 4c 4c 56 4d 20 74 61  false..# LLVM ta
07c0: 72 67 65 74 73 20 74 6f 20 62 75 69 6c 64 20 73  rgets to build s
07d0: 75 70 70 6f 72 74 20 66 6f 72 2e 0a 23 20 4e 6f  upport for..# No
07e0: 74 65 3a 20 74 68 69 73 20 69 73 20 4e 4f 54 20  te: this is NOT 
07f0: 72 65 6c 61 74 65 64 20 74 6f 20 52 75 73 74 20  related to Rust 
0800: 63 6f 6d 70 69 6c 61 74 69 6f 6e 20 74 61 72 67  compilation targ
0810: 65 74 73 2e 20 48 6f 77 65 76 65 72 2c 20 61 73  ets. However, as
0820: 20 52 75 73 74 20 69 73 0a 23 20 64 65 70 65 6e   Rust is.# depen
0830: 64 65 6e 74 20 6f 6e 20 4c 4c 56 4d 20 66 6f 72  dent on LLVM for
0840: 20 63 6f 64 65 20 67 65 6e 65 72 61 74 69 6f 6e   code generation
0850: 2c 20 74 75 72 6e 69 6e 67 20 74 61 72 67 65 74  , turning target
0860: 73 20 6f 66 66 20 68 65 72 65 20 57 49 4c 4c 20  s off here WILL 
0870: 6c 65 61 64 20 74 6f 0a 23 20 74 68 65 20 72 65  lead to.# the re
0880: 73 75 6c 74 69 6e 67 20 72 75 73 74 63 20 62 65  sulting rustc be
0890: 69 6e 67 20 75 6e 61 62 6c 65 20 74 6f 20 63 6f  ing unable to co
08a0: 6d 70 69 6c 65 20 66 6f 72 20 74 68 65 20 64 69  mpile for the di
08b0: 73 61 62 6c 65 64 20 61 72 63 68 69 74 65 63 74  sabled architect
08c0: 75 72 65 73 2e 0a 23 20 41 6c 73 6f 20 77 6f 72  ures..# Also wor
08d0: 74 68 20 70 6f 69 6e 74 69 6e 67 20 6f 75 74 20  th pointing out 
08e0: 69 73 20 74 68 61 74 2c 20 69 6e 20 63 61 73 65  is that, in case
08f0: 20 73 75 70 70 6f 72 74 20 66 6f 72 20 6e 65 77   support for new
0900: 20 74 61 72 67 65 74 73 20 61 72 65 20 61 64 64   targets are add
0910: 65 64 20 74 6f 0a 23 20 4c 4c 56 4d 2c 20 65 6e  ed to.# LLVM, en
0920: 61 62 6c 69 6e 67 20 74 68 65 6d 20 68 65 72 65  abling them here
0930: 20 64 6f 65 73 6e 27 74 20 6d 65 61 6e 20 52 75   doesn't mean Ru
0940: 73 74 20 69 73 20 61 75 74 6f 6d 61 74 69 63 61  st is automatica
0950: 6c 6c 79 20 67 61 69 6e 69 6e 67 20 73 61 69 64  lly gaining said
0960: 0a 23 20 73 75 70 70 6f 72 74 2e 20 59 6f 75 27  .# support. You'
0970: 6c 6c 20 6e 65 65 64 20 74 6f 20 77 72 69 74 65  ll need to write
0980: 20 61 20 74 61 72 67 65 74 20 73 70 65 63 69 66   a target specif
0990: 69 63 61 74 69 6f 6e 20 61 74 20 6c 65 61 73 74  ication at least
09a0: 2c 20 61 6e 64 20 6d 6f 73 74 0a 23 20 6c 69 6b  , and most.# lik
09b0: 65 6c 79 2c 20 74 65 61 63 68 20 72 75 73 74 63  ely, teach rustc
09c0: 20 61 62 6f 75 74 20 74 68 65 20 43 20 41 42 49   about the C ABI
09d0: 20 6f 66 20 74 68 65 20 74 61 72 67 65 74 2e 20   of the target. 
09e0: 47 65 74 20 69 6e 20 74 6f 75 63 68 20 77 69 74  Get in touch wit
09f0: 68 20 74 68 65 0a 23 20 52 75 73 74 20 74 65 61  h the.# Rust tea
0a00: 6d 20 61 6e 64 20 66 69 6c 65 20 61 6e 20 69 73  m and file an is
0a10: 73 75 65 20 69 66 20 79 6f 75 20 6e 65 65 64 20  sue if you need 
0a20: 61 73 73 69 73 74 61 6e 63 65 20 69 6e 20 70 6f  assistance in po
0a30: 72 74 69 6e 67 21 0a 23 74 61 72 67 65 74 73 20  rting!.#targets 
0a40: 3d 20 22 41 41 72 63 68 36 34 3b 41 52 4d 3b 48  = "AArch64;ARM;H
0a50: 65 78 61 67 6f 6e 3b 4d 53 50 34 33 30 3b 4d 69  exagon;MSP430;Mi
0a60: 70 73 3b 4e 56 50 54 58 3b 50 6f 77 65 72 50 43  ps;NVPTX;PowerPC
0a70: 3b 52 49 53 43 56 3b 53 70 61 72 63 3b 53 79 73  ;RISCV;Sparc;Sys
0a80: 74 65 6d 5a 3b 57 65 62 41 73 73 65 6d 62 6c 79  temZ;WebAssembly
0a90: 3b 58 38 36 22 0a 0a 23 20 4c 4c 56 4d 20 65 78  ;X86"..# LLVM ex
0aa0: 70 65 72 69 6d 65 6e 74 61 6c 20 74 61 72 67 65  perimental targe
0ab0: 74 73 20 74 6f 20 62 75 69 6c 64 20 73 75 70 70  ts to build supp
0ac0: 6f 72 74 20 66 6f 72 2e 20 54 68 65 73 65 20 74  ort for. These t
0ad0: 61 72 67 65 74 73 20 61 72 65 20 73 70 65 63 69  argets are speci
0ae0: 66 69 65 64 20 69 6e 0a 23 20 74 68 65 20 73 61  fied in.# the sa
0af0: 6d 65 20 66 6f 72 6d 61 74 20 61 73 20 61 62 6f  me format as abo
0b00: 76 65 2c 20 62 75 74 20 73 69 6e 63 65 20 74 68  ve, but since th
0b10: 65 73 65 20 74 61 72 67 65 74 73 20 61 72 65 20  ese targets are 
0b20: 65 78 70 65 72 69 6d 65 6e 74 61 6c 2c 20 74 68  experimental, th
0b30: 65 79 20 61 72 65 0a 23 20 6e 6f 74 20 62 75 69  ey are.# not bui
0b40: 6c 74 20 62 79 20 64 65 66 61 75 6c 74 20 61 6e  lt by default an
0b50: 64 20 74 68 65 20 65 78 70 65 72 69 6d 65 6e 74  d the experiment
0b60: 61 6c 20 52 75 73 74 20 63 6f 6d 70 69 6c 61 74  al Rust compilat
0b70: 69 6f 6e 20 74 61 72 67 65 74 73 20 74 68 61 74  ion targets that
0b80: 20 64 65 70 65 6e 64 0a 23 20 6f 6e 20 74 68 65   depend.# on the
0b90: 6d 20 77 69 6c 6c 20 6e 6f 74 20 77 6f 72 6b 20  m will not work 
0ba0: 75 6e 6c 65 73 73 20 74 68 65 20 75 73 65 72 20  unless the user 
0bb0: 6f 70 74 73 20 69 6e 20 74 6f 20 62 75 69 6c 64  opts in to build
0bc0: 69 6e 67 20 74 68 65 6d 2e 0a 23 65 78 70 65 72  ing them..#exper
0bd0: 69 6d 65 6e 74 61 6c 2d 74 61 72 67 65 74 73 20  imental-targets 
0be0: 3d 20 22 22 0a 0a 23 20 43 61 70 20 74 68 65 20  = ""..# Cap the 
0bf0: 6e 75 6d 62 65 72 20 6f 66 20 70 61 72 61 6c 6c  number of parall
0c00: 65 6c 20 6c 69 6e 6b 65 72 20 69 6e 76 6f 63 61  el linker invoca
0c10: 74 69 6f 6e 73 20 77 68 65 6e 20 63 6f 6d 70 69  tions when compi
0c20: 6c 69 6e 67 20 4c 4c 56 4d 2e 0a 23 20 54 68 69  ling LLVM..# Thi
0c30: 73 20 63 61 6e 20 62 65 20 75 73 65 66 75 6c 20  s can be useful 
0c40: 77 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 4c 4c  when building LL
0c50: 56 4d 20 77 69 74 68 20 64 65 62 75 67 20 69 6e  VM with debug in
0c60: 66 6f 2c 20 77 68 69 63 68 20 73 69 67 6e 69 66  fo, which signif
0c70: 69 63 61 6e 74 6c 79 0a 23 20 69 6e 63 72 65 61  icantly.# increa
0c80: 73 65 73 20 74 68 65 20 73 69 7a 65 20 6f 66 20  ses the size of 
0c90: 62 69 6e 61 72 69 65 73 20 61 6e 64 20 63 6f 6e  binaries and con
0ca0: 73 65 71 75 65 6e 74 6c 79 20 74 68 65 20 6d 65  sequently the me
0cb0: 6d 6f 72 79 20 72 65 71 75 69 72 65 64 20 62 79  mory required by
0cc0: 0a 23 20 65 61 63 68 20 6c 69 6e 6b 65 72 20 70  .# each linker p
0cd0: 72 6f 63 65 73 73 2e 0a 23 20 49 66 20 61 62 73  rocess..# If abs
0ce0: 65 6e 74 20 6f 72 20 30 2c 20 6c 69 6e 6b 65 72  ent or 0, linker
0cf0: 20 69 6e 76 6f 63 61 74 69 6f 6e 73 20 61 72 65   invocations are
0d00: 20 74 72 65 61 74 65 64 20 6c 69 6b 65 20 61 6e   treated like an
0d10: 79 20 6f 74 68 65 72 20 6a 6f 62 20 61 6e 64 0a  y other job and.
0d20: 23 20 63 6f 6e 74 72 6f 6c 6c 65 64 20 62 79 20  # controlled by 
0d30: 72 75 73 74 62 75 69 6c 64 27 73 20 2d 6a 20 70  rustbuild's -j p
0d40: 61 72 61 6d 65 74 65 72 2e 0a 23 6c 69 6e 6b 2d  arameter..#link-
0d50: 6a 6f 62 73 20 3d 20 30 0a 0a 23 20 57 68 65 6e  jobs = 0..# When
0d60: 20 69 6e 76 6f 6b 69 6e 67 20 60 6c 6c 76 6d 2d   invoking `llvm-
0d70: 63 6f 6e 66 69 67 60 20 74 68 69 73 20 63 6f 6e  config` this con
0d80: 66 69 67 75 72 65 73 20 77 68 65 74 68 65 72 20  figures whether 
0d90: 74 68 65 20 60 2d 2d 73 68 61 72 65 64 60 20 61  the `--shared` a
0da0: 72 67 75 6d 65 6e 74 20 69 73 0a 23 20 70 61 73  rgument is.# pas
0db0: 73 65 64 20 74 6f 20 70 72 65 66 65 72 20 6c 69  sed to prefer li
0dc0: 6e 6b 69 6e 67 20 74 6f 20 73 68 61 72 65 64 20  nking to shared 
0dd0: 6c 69 62 72 61 72 69 65 73 2e 0a 23 6c 69 6e 6b  libraries..#link
0de0: 2d 73 68 61 72 65 64 20 3d 20 66 61 6c 73 65 0a  -shared = false.
0df0: 0a 23 20 57 68 65 6e 20 62 75 69 6c 64 69 6e 67  .# When building
0e00: 20 6c 6c 76 6d 2c 20 74 68 69 73 20 63 6f 6e 66   llvm, this conf
0e10: 69 67 75 72 65 73 20 77 68 61 74 20 69 73 20 62  igures what is b
0e20: 65 69 6e 67 20 61 70 70 65 6e 64 65 64 20 74 6f  eing appended to
0e30: 20 74 68 65 20 76 65 72 73 69 6f 6e 2e 0a 23 20   the version..# 
0e40: 49 66 20 61 62 73 65 6e 74 2c 20 77 65 20 6c 65  If absent, we le
0e50: 74 20 74 68 65 20 76 65 72 73 69 6f 6e 20 61 73  t the version as
0e60: 2d 69 73 2e 0a 23 76 65 72 73 69 6f 6e 2d 73 75  -is..#version-su
0e70: 66 66 69 78 20 3d 20 22 2d 72 75 73 74 22 0a 0a  ffix = "-rust"..
0e80: 23 20 4f 6e 20 4d 53 56 43 20 79 6f 75 20 63 61  # On MSVC you ca
0e90: 6e 20 63 6f 6d 70 69 6c 65 20 4c 4c 56 4d 20 77  n compile LLVM w
0ea0: 69 74 68 20 63 6c 61 6e 67 2d 63 6c 2c 20 62 75  ith clang-cl, bu
0eb0: 74 20 74 68 65 20 74 65 73 74 20 73 75 69 74 65  t the test suite
0ec0: 20 64 6f 65 73 6e 27 74 20 70 61 73 73 0a 23 20   doesn't pass.# 
0ed0: 77 69 74 68 20 63 6c 61 6e 67 2d 63 6c 2c 20 73  with clang-cl, s
0ee0: 6f 20 74 68 69 73 20 69 73 20 73 70 65 63 69 61  o this is specia
0ef0: 6c 20 69 6e 20 74 68 61 74 20 69 74 20 6f 6e 6c  l in that it onl
0f00: 79 20 63 6f 6d 70 69 6c 65 73 20 4c 4c 56 4d 20  y compiles LLVM 
0f10: 77 69 74 68 20 63 6c 61 6e 67 2d 63 6c 0a 23 63  with clang-cl.#c
0f20: 6c 61 6e 67 2d 63 6c 20 3d 20 27 2f 70 61 74 68  lang-cl = '/path
0f30: 2f 74 6f 2f 63 6c 61 6e 67 2d 63 6c 2e 65 78 65  /to/clang-cl.exe
0f40: 27 0a 0a 23 20 50 61 73 73 20 65 78 74 72 61 20  '..# Pass extra 
0f50: 63 6f 6d 70 69 6c 65 72 20 61 6e 64 20 6c 69 6e  compiler and lin
0f60: 6b 65 72 20 66 6c 61 67 73 20 74 6f 20 74 68 65  ker flags to the
0f70: 20 4c 4c 56 4d 20 43 4d 61 6b 65 20 62 75 69 6c   LLVM CMake buil
0f80: 64 2e 0a 23 63 66 6c 61 67 73 20 3d 20 22 2d 66  d..#cflags = "-f
0f90: 65 78 74 72 61 2d 66 6c 61 67 22 0a 23 63 78 78  extra-flag".#cxx
0fa0: 66 6c 61 67 73 20 3d 20 22 2d 66 65 78 74 72 61  flags = "-fextra
0fb0: 2d 66 6c 61 67 22 0a 23 6c 64 66 6c 61 67 73 20  -flag".#ldflags 
0fc0: 3d 20 22 2d 57 6c 2c 65 78 74 72 61 2d 66 6c 61  = "-Wl,extra-fla
0fd0: 67 22 0a 0a 23 20 55 73 65 20 6c 69 62 63 2b 2b  g"..# Use libc++
0fe0: 20 77 68 65 6e 20 62 75 69 6c 64 69 6e 67 20 4c   when building L
0ff0: 4c 56 4d 20 69 6e 73 74 65 61 64 20 6f 66 20 6c  LVM instead of l
1000: 69 62 73 74 64 63 2b 2b 2e 20 54 68 69 73 20 69  ibstdc++. This i
1010: 73 20 74 68 65 20 64 65 66 61 75 6c 74 20 6f 6e  s the default on
1020: 0a 23 20 70 6c 61 74 66 6f 72 6d 73 20 61 6c 72  .# platforms alr
1030: 65 61 64 79 20 75 73 65 20 6c 69 62 63 2b 2b 20  eady use libc++ 
1040: 61 73 20 74 68 65 20 64 65 66 61 75 6c 74 20 43  as the default C
1050: 2b 2b 20 6c 69 62 72 61 72 79 2c 20 62 75 74 20  ++ library, but 
1060: 74 68 69 73 20 6f 70 74 69 6f 6e 0a 23 20 61 6c  this option.# al
1070: 6c 6f 77 73 20 79 6f 75 20 74 6f 20 75 73 65 20  lows you to use 
1080: 6c 69 62 63 2b 2b 20 65 76 65 6e 20 6f 6e 20 70  libc++ even on p
1090: 6c 61 74 66 6f 72 6d 73 20 77 68 65 6e 20 69 74  latforms when it
10a0: 27 73 20 6e 6f 74 2e 20 59 6f 75 20 6e 65 65 64  's not. You need
10b0: 20 74 6f 20 65 6e 73 75 72 65 0a 23 20 74 68 61   to ensure.# tha
10c0: 74 20 79 6f 75 72 20 68 6f 73 74 20 63 6f 6d 70  t your host comp
10d0: 69 6c 65 72 20 73 68 69 70 73 20 77 69 74 68 20  iler ships with 
10e0: 6c 69 62 63 2b 2b 2e 0a 23 75 73 65 2d 6c 69 62  libc++..#use-lib
10f0: 63 78 78 20 3d 20 74 72 75 65 0a 0a 23 20 54 68  cxx = true..# Th
1100: 65 20 76 61 6c 75 65 20 73 70 65 63 69 66 69 65  e value specifie
1110: 64 20 68 65 72 65 20 77 69 6c 6c 20 62 65 20 70  d here will be p
1120: 61 73 73 65 64 20 61 73 20 60 2d 44 4c 4c 56 4d  assed as `-DLLVM
1130: 5f 55 53 45 5f 4c 49 4e 4b 45 52 60 20 74 6f 20  _USE_LINKER` to 
1140: 43 4d 61 6b 65 2e 0a 23 75 73 65 2d 6c 69 6e 6b  CMake..#use-link
1150: 65 72 20 3d 20 22 6c 6c 64 22 0a 0a 23 20 57 68  er = "lld"..# Wh
1160: 65 74 68 65 72 20 6f 72 20 6e 6f 74 20 74 6f 20  ether or not to 
1170: 73 70 65 63 69 66 79 20 60 2d 44 4c 4c 56 4d 5f  specify `-DLLVM_
1180: 54 45 4d 50 4f 52 41 52 49 4c 59 5f 41 4c 4c 4f  TEMPORARILY_ALLO
1190: 57 5f 4f 4c 44 5f 54 4f 4f 4c 43 48 41 49 4e 3d  W_OLD_TOOLCHAIN=
11a0: 59 45 53 60 0a 23 61 6c 6c 6f 77 2d 6f 6c 64 2d  YES`.#allow-old-
11b0: 74 6f 6f 6c 63 68 61 69 6e 20 3d 20 66 61 6c 73  toolchain = fals
11c0: 65 0a 0a 23 20 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  e..# ===========
11d0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
11e0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
11f0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
1200: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
1210: 3d 3d 0a 23 20 47 65 6e 65 72 61 6c 20 62 75 69  ==.# General bui
1220: 6c 64 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e  ld configuration
1230: 20 6f 70 74 69 6f 6e 73 0a 23 20 3d 3d 3d 3d 3d   options.# =====
1240: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
1250: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
1260: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
1270: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
1280: 3d 3d 3d 3d 3d 3d 3d 3d 0a 5b 62 75 69 6c 64 5d  ========.[build]
1290: 0a 0a 23 20 42 75 69 6c 64 20 74 72 69 70 6c 65  ..# Build triple
12a0: 20 66 6f 72 20 74 68 65 20 6f 72 69 67 69 6e 61   for the origina
12b0: 6c 20 73 6e 61 70 73 68 6f 74 20 63 6f 6d 70 69  l snapshot compi
12c0: 6c 65 72 2e 20 54 68 69 73 20 6d 75 73 74 20 62  ler. This must b
12d0: 65 20 61 20 63 6f 6d 70 69 6c 65 72 20 74 68 61  e a compiler tha
12e0: 74 0a 23 20 6e 69 67 68 74 6c 69 65 73 20 61 72  t.# nightlies ar
12f0: 65 20 61 6c 72 65 61 64 79 20 70 72 6f 64 75 63  e already produc
1300: 65 64 20 66 6f 72 2e 20 54 68 65 20 63 75 72 72  ed for. The curr
1310: 65 6e 74 20 70 6c 61 74 66 6f 72 6d 20 6d 75 73  ent platform mus
1320: 74 20 62 65 20 61 62 6c 65 20 74 6f 20 72 75 6e  t be able to run
1330: 0a 23 20 62 69 6e 61 72 69 65 73 20 6f 66 20 74  .# binaries of t
1340: 68 69 73 20 62 75 69 6c 64 20 74 72 69 70 6c 65  his build triple
1350: 20 61 6e 64 20 74 68 65 20 6e 69 67 68 74 6c 79   and the nightly
1360: 20 77 69 6c 6c 20 62 65 20 75 73 65 64 20 74 6f   will be used to
1370: 20 62 6f 6f 74 73 74 72 61 70 20 74 68 65 0a 23   bootstrap the.#
1380: 20 66 69 72 73 74 20 63 6f 6d 70 69 6c 65 72 2e   first compiler.
1390: 0a 23 62 75 69 6c 64 20 3d 20 22 78 38 36 5f 36  .#build = "x86_6
13a0: 34 2d 75 6e 6b 6e 6f 77 6e 2d 6c 69 6e 75 78 2d  4-unknown-linux-
13b0: 67 6e 75 22 20 20 20 20 23 20 64 65 66 61 75 6c  gnu"    # defaul
13c0: 74 73 20 74 6f 20 79 6f 75 72 20 68 6f 73 74 20  ts to your host 
13d0: 70 6c 61 74 66 6f 72 6d 0a 0a 23 20 49 6e 20 61  platform..# In a
13e0: 64 64 69 74 69 6f 6e 20 74 6f 20 74 68 65 20 62  ddition to the b
13f0: 75 69 6c 64 20 74 72 69 70 6c 65 2c 20 6f 74 68  uild triple, oth
1400: 65 72 20 74 72 69 70 6c 65 73 20 74 6f 20 70 72  er triples to pr
1410: 6f 64 75 63 65 20 66 75 6c 6c 20 63 6f 6d 70 69  oduce full compi
1420: 6c 65 72 0a 23 20 74 6f 6f 6c 63 68 61 69 6e 73  ler.# toolchains
1430: 20 66 6f 72 2e 20 45 61 63 68 20 6f 66 20 74 68   for. Each of th
1440: 65 73 65 20 74 72 69 70 6c 65 73 20 77 69 6c 6c  ese triples will
1450: 20 62 65 20 62 6f 6f 74 73 74 72 61 70 70 65 64   be bootstrapped
1460: 20 66 72 6f 6d 20 74 68 65 20 62 75 69 6c 64 0a   from the build.
1470: 23 20 74 72 69 70 6c 65 20 61 6e 64 20 74 68 65  # triple and the
1480: 6e 20 77 69 6c 6c 20 63 6f 6e 74 69 6e 75 65 20  n will continue 
1490: 74 6f 20 62 6f 6f 74 73 74 72 61 70 20 74 68 65  to bootstrap the
14a0: 6d 73 65 6c 76 65 73 2e 20 54 68 69 73 20 70 6c  mselves. This pl
14b0: 61 74 66 6f 72 6d 20 6d 75 73 74 0a 23 20 63 75  atform must.# cu
14c0: 72 72 65 6e 74 6c 79 20 62 65 20 61 62 6c 65 20  rrently be able 
14d0: 74 6f 20 72 75 6e 20 61 6c 6c 20 6f 66 20 74 68  to run all of th
14e0: 65 20 74 72 69 70 6c 65 73 20 70 72 6f 76 69 64  e triples provid
14f0: 65 64 20 68 65 72 65 2e 0a 23 68 6f 73 74 20 3d  ed here..#host =
1500: 20 5b 22 78 38 36 5f 36 34 2d 75 6e 6b 6e 6f 77   ["x86_64-unknow
1510: 6e 2d 6c 69 6e 75 78 2d 67 6e 75 22 5d 20 20 20  n-linux-gnu"]   
1520: 23 20 64 65 66 61 75 6c 74 73 20 74 6f 20 6a 75  # defaults to ju
1530: 73 74 20 74 68 65 20 62 75 69 6c 64 20 74 72 69  st the build tri
1540: 70 6c 65 0a 0a 23 20 49 6e 20 61 64 64 69 74 69  ple..# In additi
1550: 6f 6e 20 74 6f 20 61 6c 6c 20 68 6f 73 74 20 74  on to all host t
1560: 72 69 70 6c 65 73 2c 20 6f 74 68 65 72 20 74 72  riples, other tr
1570: 69 70 6c 65 73 20 74 6f 20 70 72 6f 64 75 63 65  iples to produce
1580: 20 74 68 65 20 73 74 61 6e 64 61 72 64 20 6c 69   the standard li
1590: 62 72 61 72 79 0a 23 20 66 6f 72 2e 20 45 61 63  brary.# for. Eac
15a0: 68 20 68 6f 73 74 20 74 72 69 70 6c 65 20 77 69  h host triple wi
15b0: 6c 6c 20 62 65 20 75 73 65 64 20 74 6f 20 70 72  ll be used to pr
15c0: 6f 64 75 63 65 20 61 20 63 6f 70 79 20 6f 66 20  oduce a copy of 
15d0: 74 68 65 20 73 74 61 6e 64 61 72 64 20 6c 69 62  the standard lib
15e0: 72 61 72 79 0a 23 20 66 6f 72 20 65 61 63 68 20  rary.# for each 
15f0: 74 61 72 67 65 74 20 74 72 69 70 6c 65 2e 0a 23  target triple..#
1600: 74 61 72 67 65 74 20 3d 20 5b 22 78 38 36 5f 36  target = ["x86_6
1610: 34 2d 75 6e 6b 6e 6f 77 6e 2d 6c 69 6e 75 78 2d  4-unknown-linux-
1620: 67 6e 75 22 5d 20 23 20 64 65 66 61 75 6c 74 73  gnu"] # defaults
1630: 20 74 6f 20 6a 75 73 74 20 74 68 65 20 62 75 69   to just the bui
1640: 6c 64 20 74 72 69 70 6c 65 0a 0a 23 20 49 6e 73  ld triple..# Ins
1650: 74 65 61 64 20 6f 66 20 64 6f 77 6e 6c 6f 61 64  tead of download
1660: 69 6e 67 20 74 68 65 20 73 72 63 2f 73 74 61 67  ing the src/stag
1670: 65 30 2e 74 78 74 20 76 65 72 73 69 6f 6e 20 6f  e0.txt version o
1680: 66 20 43 61 72 67 6f 20 73 70 65 63 69 66 69 65  f Cargo specifie
1690: 64 2c 20 75 73 65 0a 23 20 74 68 69 73 20 43 61  d, use.# this Ca
16a0: 72 67 6f 20 62 69 6e 61 72 79 20 69 6e 73 74 65  rgo binary inste
16b0: 61 64 20 74 6f 20 62 75 69 6c 64 20 61 6c 6c 20  ad to build all 
16c0: 52 75 73 74 20 63 6f 64 65 0a 23 63 61 72 67 6f  Rust code.#cargo
16d0: 20 3d 20 22 2f 70 61 74 68 2f 74 6f 2f 62 69 6e   = "/path/to/bin
16e0: 2f 63 61 72 67 6f 22 0a 0a 23 20 49 6e 73 74 65  /cargo"..# Inste
16f0: 61 64 20 6f 66 20 64 6f 77 6e 6c 6f 61 64 69 6e  ad of downloadin
1700: 67 20 74 68 65 20 73 72 63 2f 73 74 61 67 65 30  g the src/stage0
1710: 2e 74 78 74 20 76 65 72 73 69 6f 6e 20 6f 66 20  .txt version of 
1720: 74 68 65 20 63 6f 6d 70 69 6c 65 72 0a 23 20 73  the compiler.# s
1730: 70 65 63 69 66 69 65 64 2c 20 75 73 65 20 74 68  pecified, use th
1740: 69 73 20 72 75 73 74 63 20 62 69 6e 61 72 79 20  is rustc binary 
1750: 69 6e 73 74 65 61 64 20 61 73 20 74 68 65 20 73  instead as the s
1760: 74 61 67 65 30 20 73 6e 61 70 73 68 6f 74 20 63  tage0 snapshot c
1770: 6f 6d 70 69 6c 65 72 2e 0a 23 72 75 73 74 63 20  ompiler..#rustc 
1780: 3d 20 22 2f 70 61 74 68 2f 74 6f 2f 62 69 6e 2f  = "/path/to/bin/
1790: 72 75 73 74 63 22 0a 0a 23 20 46 6c 61 67 20 74  rustc"..# Flag t
17a0: 6f 20 73 70 65 63 69 66 79 20 77 68 65 74 68 65  o specify whethe
17b0: 72 20 61 6e 79 20 64 6f 63 75 6d 65 6e 74 61 74  r any documentat
17c0: 69 6f 6e 20 69 73 20 62 75 69 6c 74 2e 20 49 66  ion is built. If
17d0: 20 66 61 6c 73 65 2c 20 72 75 73 74 64 6f 63 20   false, rustdoc 
17e0: 61 6e 64 0a 23 20 66 72 69 65 6e 64 73 20 77 69  and.# friends wi
17f0: 6c 6c 20 73 74 69 6c 6c 20 62 65 20 63 6f 6d 70  ll still be comp
1800: 69 6c 65 64 20 62 75 74 20 74 68 65 79 20 77 69  iled but they wi
1810: 6c 6c 20 6e 6f 74 20 62 65 20 75 73 65 64 20 74  ll not be used t
1820: 6f 20 67 65 6e 65 72 61 74 65 20 61 6e 79 0a 23  o generate any.#
1830: 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f 6e 2e 0a   documentation..
1840: 23 64 6f 63 73 20 3d 20 74 72 75 65 0a 0a 23 20  #docs = true..# 
1850: 49 6e 64 69 63 61 74 65 20 77 68 65 74 68 65 72  Indicate whether
1860: 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 73 68   the compiler sh
1870: 6f 75 6c 64 20 62 65 20 64 6f 63 75 6d 65 6e 74  ould be document
1880: 65 64 20 69 6e 20 61 64 64 69 74 69 6f 6e 20 74  ed in addition t
1890: 6f 20 74 68 65 20 73 74 61 6e 64 61 72 64 0a 23  o the standard.#
18a0: 20 6c 69 62 72 61 72 79 20 61 6e 64 20 66 61 63   library and fac
18b0: 61 64 65 20 63 72 61 74 65 73 2e 0a 23 63 6f 6d  ade crates..#com
18c0: 70 69 6c 65 72 2d 64 6f 63 73 20 3d 20 66 61 6c  piler-docs = fal
18d0: 73 65 0a 0a 23 20 49 6e 64 69 63 61 74 65 20 77  se..# Indicate w
18e0: 68 65 74 68 65 72 20 67 69 74 20 73 75 62 6d 6f  hether git submo
18f0: 64 75 6c 65 73 20 61 72 65 20 6d 61 6e 61 67 65  dules are manage
1900: 64 20 61 6e 64 20 75 70 64 61 74 65 64 20 61 75  d and updated au
1910: 74 6f 6d 61 74 69 63 61 6c 6c 79 2e 0a 23 73 75  tomatically..#su
1920: 62 6d 6f 64 75 6c 65 73 20 3d 20 74 72 75 65 0a  bmodules = true.
1930: 0a 23 20 55 70 64 61 74 65 20 67 69 74 20 73 75  .# Update git su
1940: 62 6d 6f 64 75 6c 65 73 20 6f 6e 6c 79 20 77 68  bmodules only wh
1950: 65 6e 20 74 68 65 20 63 68 65 63 6b 65 64 20 6f  en the checked o
1960: 75 74 20 63 6f 6d 6d 69 74 20 69 6e 20 74 68 65  ut commit in the
1970: 20 73 75 62 6d 6f 64 75 6c 65 73 20 64 69 66 66   submodules diff
1980: 65 72 73 0a 23 20 66 72 6f 6d 20 77 68 61 74 20  ers.# from what 
1990: 69 73 20 63 6f 6d 6d 69 74 74 65 64 20 69 6e 20  is committed in 
19a0: 74 68 65 20 6d 61 69 6e 20 72 75 73 74 63 20 72  the main rustc r
19b0: 65 70 6f 2e 0a 23 66 61 73 74 2d 73 75 62 6d 6f  epo..#fast-submo
19c0: 64 75 6c 65 73 20 3d 20 74 72 75 65 0a 0a 23 20  dules = true..# 
19d0: 54 68 65 20 70 61 74 68 20 74 6f 20 28 6f 72 20  The path to (or 
19e0: 6e 61 6d 65 20 6f 66 29 20 74 68 65 20 47 44 42  name of) the GDB
19f0: 20 65 78 65 63 75 74 61 62 6c 65 20 74 6f 20 75   executable to u
1a00: 73 65 2e 20 54 68 69 73 20 69 73 20 6f 6e 6c 79  se. This is only
1a10: 20 75 73 65 64 20 66 6f 72 0a 23 20 65 78 65 63   used for.# exec
1a20: 75 74 69 6e 67 20 74 68 65 20 64 65 62 75 67 69  uting the debugi
1a30: 6e 66 6f 20 74 65 73 74 20 73 75 69 74 65 2e 0a  nfo test suite..
1a40: 23 67 64 62 20 3d 20 22 67 64 62 22 0a 0a 23 20  #gdb = "gdb"..# 
1a50: 54 68 65 20 6e 6f 64 65 2e 6a 73 20 65 78 65 63  The node.js exec
1a60: 75 74 61 62 6c 65 20 74 6f 20 75 73 65 2e 20 4e  utable to use. N
1a70: 6f 74 65 20 74 68 61 74 20 74 68 69 73 20 69 73  ote that this is
1a80: 20 6f 6e 6c 79 20 75 73 65 64 20 66 6f 72 20 74   only used for t
1a90: 68 65 20 65 6d 73 63 72 69 70 74 65 6e 0a 23 20  he emscripten.# 
1aa0: 74 61 72 67 65 74 20 77 68 65 6e 20 72 75 6e 6e  target when runn
1ab0: 69 6e 67 20 74 65 73 74 73 2c 20 6f 74 68 65 72  ing tests, other
1ac0: 77 69 73 65 20 74 68 69 73 20 63 61 6e 20 62 65  wise this can be
1ad0: 20 6f 6d 69 74 74 65 64 2e 0a 23 6e 6f 64 65 6a   omitted..#nodej
1ae0: 73 20 3d 20 22 6e 6f 64 65 22 0a 0a 23 20 50 79  s = "node"..# Py
1af0: 74 68 6f 6e 20 69 6e 74 65 72 70 72 65 74 65 72  thon interpreter
1b00: 20 74 6f 20 75 73 65 20 66 6f 72 20 76 61 72 69   to use for vari
1b10: 6f 75 73 20 74 61 73 6b 73 20 74 68 72 6f 75 67  ous tasks throug
1b20: 68 6f 75 74 20 74 68 65 20 62 75 69 6c 64 2c 20  hout the build, 
1b30: 6e 6f 74 61 62 6c 79 0a 23 20 72 75 73 74 64 6f  notably.# rustdo
1b40: 63 20 74 65 73 74 73 2c 20 74 68 65 20 6c 6c 64  c tests, the lld
1b50: 62 20 70 79 74 68 6f 6e 20 69 6e 74 65 72 70 72  b python interpr
1b60: 65 74 65 72 2c 20 61 6e 64 20 73 6f 6d 65 20 64  eter, and some d
1b70: 69 73 74 20 62 69 74 73 20 61 6e 64 20 70 69 65  ist bits and pie
1b80: 63 65 73 2e 0a 23 20 4e 6f 74 65 20 74 68 61 74  ces..# Note that
1b90: 20 50 79 74 68 6f 6e 20 32 20 69 73 20 63 75 72   Python 2 is cur
1ba0: 72 65 6e 74 6c 79 20 72 65 71 75 69 72 65 64 2e  rently required.
1bb0: 0a 23 0a 23 20 44 65 66 61 75 6c 74 73 20 74 6f  .#.# Defaults to
1bc0: 20 70 79 74 68 6f 6e 32 2e 37 2c 20 74 68 65 6e   python2.7, then
1bd0: 20 70 79 74 68 6f 6e 32 2e 20 49 66 20 6e 65 69   python2. If nei
1be0: 74 68 65 72 20 65 78 65 63 75 74 61 62 6c 65 20  ther executable 
1bf0: 63 61 6e 20 62 65 20 66 6f 75 6e 64 2c 20 74 68  can be found, th
1c00: 65 6e 0a 23 20 69 74 20 64 65 66 61 75 6c 74 73  en.# it defaults
1c10: 20 74 6f 20 74 68 65 20 50 79 74 68 6f 6e 20 69   to the Python i
1c20: 6e 74 65 72 70 72 65 74 65 72 20 75 73 65 64 20  nterpreter used 
1c30: 74 6f 20 65 78 65 63 75 74 65 20 78 2e 70 79 2e  to execute x.py.
1c40: 0a 23 70 79 74 68 6f 6e 20 3d 20 22 70 79 74 68  .#python = "pyth
1c50: 6f 6e 32 2e 37 22 0a 0a 23 20 46 6f 72 63 65 20  on2.7"..# Force 
1c60: 43 61 72 67 6f 20 74 6f 20 63 68 65 63 6b 20 74  Cargo to check t
1c70: 68 61 74 20 43 61 72 67 6f 2e 6c 6f 63 6b 20 64  hat Cargo.lock d
1c80: 65 73 63 72 69 62 65 73 20 74 68 65 20 70 72 65  escribes the pre
1c90: 63 69 73 65 20 64 65 70 65 6e 64 65 6e 63 79 0a  cise dependency.
1ca0: 23 20 73 65 74 20 74 68 61 74 20 61 6c 6c 20 74  # set that all t
1cb0: 68 65 20 43 61 72 67 6f 2e 74 6f 6d 6c 20 66 69  he Cargo.toml fi
1cc0: 6c 65 73 20 63 72 65 61 74 65 2c 20 69 6e 73 74  les create, inst
1cd0: 65 61 64 20 6f 66 20 75 70 64 61 74 69 6e 67 20  ead of updating 
1ce0: 69 74 2e 0a 23 6c 6f 63 6b 65 64 2d 64 65 70 73  it..#locked-deps
1cf0: 20 3d 20 66 61 6c 73 65 0a 0a 23 20 49 6e 64 69   = false..# Indi
1d00: 63 61 74 65 20 77 68 65 74 68 65 72 20 74 68 65  cate whether the
1d10: 20 76 65 6e 64 6f 72 65 64 20 73 6f 75 72 63 65   vendored source
1d20: 73 20 61 72 65 20 75 73 65 64 20 66 6f 72 20 52  s are used for R
1d30: 75 73 74 20 64 65 70 65 6e 64 65 6e 63 69 65 73  ust dependencies
1d40: 20 6f 72 20 6e 6f 74 0a 23 76 65 6e 64 6f 72 20   or not.#vendor 
1d50: 3d 20 66 61 6c 73 65 0a 0a 23 20 54 79 70 69 63  = false..# Typic
1d60: 61 6c 6c 79 20 74 68 65 20 62 75 69 6c 64 20 73  ally the build s
1d70: 79 73 74 65 6d 20 77 69 6c 6c 20 62 75 69 6c 64  ystem will build
1d80: 20 74 68 65 20 72 75 73 74 20 63 6f 6d 70 69 6c   the rust compil
1d90: 65 72 20 74 77 69 63 65 2e 20 54 68 65 20 73 65  er twice. The se
1da0: 63 6f 6e 64 0a 23 20 63 6f 6d 70 69 6c 65 72 2c  cond.# compiler,
1db0: 20 68 6f 77 65 76 65 72 2c 20 77 69 6c 6c 20 73   however, will s
1dc0: 69 6d 70 6c 79 20 75 73 65 20 69 74 73 20 6f 77  imply use its ow
1dd0: 6e 20 6c 69 62 72 61 72 69 65 73 20 74 6f 20 6c  n libraries to l
1de0: 69 6e 6b 20 61 67 61 69 6e 73 74 2e 20 49 66 20  ink against. If 
1df0: 79 6f 75 0a 23 20 77 6f 75 6c 64 20 72 61 74 68  you.# would rath
1e00: 65 72 20 74 6f 20 70 65 72 66 6f 72 6d 20 61 20  er to perform a 
1e10: 66 75 6c 6c 20 62 6f 6f 74 73 74 72 61 70 2c 20  full bootstrap, 
1e20: 63 6f 6d 70 69 6c 69 6e 67 20 74 68 65 20 63 6f  compiling the co
1e30: 6d 70 69 6c 65 72 20 74 68 72 65 65 20 74 69 6d  mpiler three tim
1e40: 65 73 2c 0a 23 20 74 68 65 6e 20 79 6f 75 20 63  es,.# then you c
1e50: 61 6e 20 73 65 74 20 74 68 69 73 20 6f 70 74 69  an set this opti
1e60: 6f 6e 20 74 6f 20 74 72 75 65 2e 20 59 6f 75 20  on to true. You 
1e70: 73 68 6f 75 6c 64 6e 27 74 20 65 76 65 72 20 6e  shouldn't ever n
1e80: 65 65 64 20 74 6f 20 73 65 74 20 74 68 69 73 0a  eed to set this.
1e90: 23 20 6f 70 74 69 6f 6e 20 74 6f 20 74 72 75 65  # option to true
1ea0: 2e 0a 23 66 75 6c 6c 2d 62 6f 6f 74 73 74 72 61  ..#full-bootstra
1eb0: 70 20 3d 20 66 61 6c 73 65 0a 0a 23 20 45 6e 61  p = false..# Ena
1ec0: 62 6c 65 20 61 20 62 75 69 6c 64 20 6f 66 20 74  ble a build of t
1ed0: 68 65 20 65 78 74 65 6e 64 65 64 20 72 75 73 74  he extended rust
1ee0: 20 74 6f 6f 6c 20 73 65 74 20 77 68 69 63 68 20   tool set which 
1ef0: 69 73 20 6e 6f 74 20 6f 6e 6c 79 20 74 68 65 20  is not only the 
1f00: 63 6f 6d 70 69 6c 65 72 0a 23 20 62 75 74 20 61  compiler.# but a
1f10: 6c 73 6f 20 74 6f 6f 6c 73 20 73 75 63 68 20 61  lso tools such a
1f20: 73 20 43 61 72 67 6f 2e 20 54 68 69 73 20 77 69  s Cargo. This wi
1f30: 6c 6c 20 61 6c 73 6f 20 70 72 6f 64 75 63 65 20  ll also produce 
1f40: 22 63 6f 6d 62 69 6e 65 64 20 69 6e 73 74 61 6c  "combined instal
1f50: 6c 65 72 73 22 0a 23 20 77 68 69 63 68 20 61 72  lers".# which ar
1f60: 65 20 75 73 65 64 20 74 6f 20 69 6e 73 74 61 6c  e used to instal
1f70: 6c 20 52 75 73 74 20 61 6e 64 20 43 61 72 67 6f  l Rust and Cargo
1f80: 20 74 6f 67 65 74 68 65 72 2e 20 54 68 69 73 20   together. This 
1f90: 69 73 20 64 69 73 61 62 6c 65 64 20 62 79 0a 23  is disabled by.#
1fa0: 20 64 65 66 61 75 6c 74 2e 0a 23 65 78 74 65 6e   default..#exten
1fb0: 64 65 64 20 3d 20 66 61 6c 73 65 0a 0a 23 20 49  ded = false..# I
1fc0: 6e 73 74 61 6c 6c 73 20 63 68 6f 73 65 6e 20 73  nstalls chosen s
1fd0: 65 74 20 6f 66 20 65 78 74 65 6e 64 65 64 20 74  et of extended t
1fe0: 6f 6f 6c 73 20 69 66 20 65 6e 61 62 6c 65 64 2e  ools if enabled.
1ff0: 20 42 79 20 64 65 66 61 75 6c 74 20 62 75 69 6c   By default buil
2000: 64 73 20 61 6c 6c 2e 0a 23 20 49 66 20 63 68 6f  ds all..# If cho
2010: 73 65 6e 20 74 6f 6f 6c 20 66 61 69 6c 65 64 20  sen tool failed 
2020: 74 6f 20 62 75 69 6c 64 20 74 68 65 20 69 6e 73  to build the ins
2030: 74 61 6c 6c 61 74 69 6f 6e 20 66 61 69 6c 73 2e  tallation fails.
2040: 0a 23 74 6f 6f 6c 73 20 3d 20 5b 22 63 61 72 67  .#tools = ["carg
2050: 6f 22 2c 20 22 72 6c 73 22 2c 20 22 63 6c 69 70  o", "rls", "clip
2060: 70 79 22 2c 20 22 72 75 73 74 66 6d 74 22 2c 20  py", "rustfmt", 
2070: 22 61 6e 61 6c 79 73 69 73 22 2c 20 22 73 72 63  "analysis", "src
2080: 22 5d 0a 0a 23 20 56 65 72 62 6f 73 69 74 79 20  "]..# Verbosity 
2090: 6c 65 76 65 6c 3a 20 30 20 3d 3d 20 6e 6f 74 20  level: 0 == not 
20a0: 76 65 72 62 6f 73 65 2c 20 31 20 3d 3d 20 76 65  verbose, 1 == ve
20b0: 72 62 6f 73 65 2c 20 32 20 3d 3d 20 76 65 72 79  rbose, 2 == very
20c0: 20 76 65 72 62 6f 73 65 0a 23 76 65 72 62 6f 73   verbose.#verbos
20d0: 65 20 3d 20 30 0a 0a 23 20 42 75 69 6c 64 20 74  e = 0..# Build t
20e0: 68 65 20 73 61 6e 69 74 69 7a 65 72 20 72 75 6e  he sanitizer run
20f0: 74 69 6d 65 73 0a 23 73 61 6e 69 74 69 7a 65 72  times.#sanitizer
2100: 73 20 3d 20 66 61 6c 73 65 0a 0a 23 20 42 75 69  s = false..# Bui
2110: 6c 64 20 74 68 65 20 70 72 6f 66 69 6c 65 72 20  ld the profiler 
2120: 72 75 6e 74 69 6d 65 0a 23 70 72 6f 66 69 6c 65  runtime.#profile
2130: 72 20 3d 20 66 61 6c 73 65 0a 0a 23 20 49 6e 64  r = false..# Ind
2140: 69 63 61 74 65 73 20 77 68 65 74 68 65 72 20 74  icates whether t
2150: 68 65 20 6e 61 74 69 76 65 20 6c 69 62 72 61 72  he native librar
2160: 69 65 73 20 6c 69 6e 6b 65 64 20 69 6e 74 6f 20  ies linked into 
2170: 43 61 72 67 6f 20 77 69 6c 6c 20 62 65 20 73 74  Cargo will be st
2180: 61 74 69 63 61 6c 6c 79 0a 23 20 6c 69 6e 6b 65  atically.# linke
2190: 64 20 6f 72 20 6e 6f 74 2e 0a 23 63 61 72 67 6f  d or not..#cargo
21a0: 2d 6e 61 74 69 76 65 2d 73 74 61 74 69 63 20 3d  -native-static =
21b0: 20 66 61 6c 73 65 0a 0a 23 20 52 75 6e 20 74 68   false..# Run th
21c0: 65 20 62 75 69 6c 64 20 77 69 74 68 20 6c 6f 77  e build with low
21d0: 20 70 72 69 6f 72 69 74 79 2c 20 62 79 20 73 65   priority, by se
21e0: 74 74 69 6e 67 20 74 68 65 20 70 72 6f 63 65 73  tting the proces
21f0: 73 20 67 72 6f 75 70 27 73 20 22 6e 69 63 65 22  s group's "nice"
2200: 20 76 61 6c 75 65 0a 23 20 74 6f 20 2b 31 30 20   value.# to +10 
2210: 6f 6e 20 55 6e 69 78 20 70 6c 61 74 66 6f 72 6d  on Unix platform
2220: 73 2c 20 61 6e 64 20 62 79 20 75 73 69 6e 67 20  s, and by using 
2230: 61 20 22 6c 6f 77 20 70 72 69 6f 72 69 74 79 22  a "low priority"
2240: 20 6a 6f 62 20 6f 62 6a 65 63 74 20 6f 6e 20 57   job object on W
2250: 69 6e 64 6f 77 73 2e 0a 23 6c 6f 77 2d 70 72 69  indows..#low-pri
2260: 6f 72 69 74 79 20 3d 20 66 61 6c 73 65 0a 0a 23  ority = false..#
2270: 20 41 72 67 75 6d 65 6e 74 73 20 70 61 73 73 65   Arguments passe
2280: 64 20 74 6f 20 74 68 65 20 60 2e 2f 63 6f 6e 66  d to the `./conf
2290: 69 67 75 72 65 60 20 73 63 72 69 70 74 2c 20 75  igure` script, u
22a0: 73 65 64 20 64 75 72 69 6e 67 20 64 69 73 74 63  sed during distc
22b0: 68 65 63 6b 2e 20 59 6f 75 0a 23 20 70 72 6f 62  heck. You.# prob
22c0: 61 62 6c 79 20 77 6f 6e 27 74 20 66 69 6c 6c 20  ably won't fill 
22d0: 74 68 69 73 20 69 6e 20 62 75 74 20 72 61 74 68  this in but rath
22e0: 65 72 20 69 74 27 73 20 66 69 6c 6c 65 64 20 69  er it's filled i
22f0: 6e 20 62 79 20 74 68 65 20 60 2e 2f 63 6f 6e 66  n by the `./conf
2300: 69 67 75 72 65 60 0a 23 20 73 63 72 69 70 74 2e  igure`.# script.
2310: 0a 23 63 6f 6e 66 69 67 75 72 65 2d 61 72 67 73  .#configure-args
2320: 20 3d 20 5b 5d 0a 0a 23 20 49 6e 64 69 63 61 74   = []..# Indicat
2330: 65 73 20 74 68 61 74 20 61 20 6c 6f 63 61 6c 20  es that a local 
2340: 72 65 62 75 69 6c 64 20 69 73 20 6f 63 63 75 72  rebuild is occur
2350: 72 69 6e 67 20 69 6e 73 74 65 61 64 20 6f 66 20  ring instead of 
2360: 61 20 66 75 6c 6c 20 62 6f 6f 74 73 74 72 61 70  a full bootstrap
2370: 2c 0a 23 20 65 73 73 65 6e 74 69 61 6c 6c 79 20  ,.# essentially 
2380: 73 6b 69 70 70 69 6e 67 20 73 74 61 67 65 30 20  skipping stage0 
2390: 61 73 20 74 68 65 20 6c 6f 63 61 6c 20 63 6f 6d  as the local com
23a0: 70 69 6c 65 72 20 69 73 20 72 65 63 6f 6d 70 69  piler is recompi
23b0: 6c 69 6e 67 20 69 74 73 65 6c 66 20 61 67 61 69  ling itself agai
23c0: 6e 2e 0a 23 6c 6f 63 61 6c 2d 72 65 62 75 69 6c  n..#local-rebuil
23d0: 64 20 3d 20 66 61 6c 73 65 0a 0a 23 20 50 72 69  d = false..# Pri
23e0: 6e 74 20 6f 75 74 20 68 6f 77 20 6c 6f 6e 67 20  nt out how long 
23f0: 65 61 63 68 20 72 75 73 74 62 75 69 6c 64 20 73  each rustbuild s
2400: 74 65 70 20 74 6f 6f 6b 20 28 6d 6f 73 74 6c 79  tep took (mostly
2410: 20 69 6e 74 65 6e 64 65 64 20 66 6f 72 20 43 49   intended for CI
2420: 20 61 6e 64 0a 23 20 74 72 61 63 6b 69 6e 67 20   and.# tracking 
2430: 6f 76 65 72 20 74 69 6d 65 29 0a 23 70 72 69 6e  over time).#prin
2440: 74 2d 73 74 65 70 2d 74 69 6d 69 6e 67 73 20 3d  t-step-timings =
2450: 20 66 61 6c 73 65 0a 0a 23 20 3d 3d 3d 3d 3d 3d   false..# ======
2460: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
2470: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
2480: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
2490: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
24a0: 3d 3d 3d 3d 3d 3d 3d 0a 23 20 47 65 6e 65 72 61  =======.# Genera
24b0: 6c 20 69 6e 73 74 61 6c 6c 20 63 6f 6e 66 69 67  l install config
24c0: 75 72 61 74 69 6f 6e 20 6f 70 74 69 6f 6e 73 0a  uration options.
24d0: 23 20 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  # ==============
24e0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
24f0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
2500: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
2510: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a  ===============.
2520: 5b 69 6e 73 74 61 6c 6c 5d 0a 0a 23 20 49 6e 73  [install]..# Ins
2530: 74 65 61 64 20 6f 66 20 69 6e 73 74 61 6c 6c 69  tead of installi
2540: 6e 67 20 74 6f 20 2f 75 73 72 2f 6c 6f 63 61 6c  ng to /usr/local
2550: 2c 20 69 6e 73 74 61 6c 6c 20 74 6f 20 74 68 69  , install to thi
2560: 73 20 70 61 74 68 20 69 6e 73 74 65 61 64 2e 0a  s path instead..
2570: 23 70 72 65 66 69 78 20 3d 20 22 2f 75 73 72 2f  #prefix = "/usr/
2580: 6c 6f 63 61 6c 22 0a 0a 23 20 57 68 65 72 65 20  local"..# Where 
2590: 74 6f 20 69 6e 73 74 61 6c 6c 20 73 79 73 74 65  to install syste
25a0: 6d 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20  m configuration 
25b0: 66 69 6c 65 73 0a 23 20 49 66 20 74 68 69 73 20  files.# If this 
25c0: 69 73 20 61 20 72 65 6c 61 74 69 76 65 20 70 61  is a relative pa
25d0: 74 68 2c 20 69 74 20 77 69 6c 6c 20 67 65 74 20  th, it will get 
25e0: 69 6e 73 74 61 6c 6c 65 64 20 69 6e 20 60 70 72  installed in `pr
25f0: 65 66 69 78 60 20 61 62 6f 76 65 0a 23 73 79 73  efix` above.#sys
2600: 63 6f 6e 66 64 69 72 20 3d 20 22 2f 65 74 63 22  confdir = "/etc"
2610: 0a 0a 23 20 57 68 65 72 65 20 74 6f 20 69 6e 73  ..# Where to ins
2620: 74 61 6c 6c 20 64 6f 63 75 6d 65 6e 74 61 74 69  tall documentati
2630: 6f 6e 20 69 6e 20 60 70 72 65 66 69 78 60 20 61  on in `prefix` a
2640: 62 6f 76 65 0a 23 64 6f 63 64 69 72 20 3d 20 22  bove.#docdir = "
2650: 73 68 61 72 65 2f 64 6f 63 2f 72 75 73 74 22 0a  share/doc/rust".
2660: 0a 23 20 57 68 65 72 65 20 74 6f 20 69 6e 73 74  .# Where to inst
2670: 61 6c 6c 20 62 69 6e 61 72 69 65 73 20 69 6e 20  all binaries in 
2680: 60 70 72 65 66 69 78 60 20 61 62 6f 76 65 0a 23  `prefix` above.#
2690: 62 69 6e 64 69 72 20 3d 20 22 62 69 6e 22 0a 0a  bindir = "bin"..
26a0: 23 20 57 68 65 72 65 20 74 6f 20 69 6e 73 74 61  # Where to insta
26b0: 6c 6c 20 6c 69 62 72 61 72 69 65 73 20 69 6e 20  ll libraries in 
26c0: 60 70 72 65 66 69 78 60 20 61 62 6f 76 65 0a 23  `prefix` above.#
26d0: 6c 69 62 64 69 72 20 3d 20 22 6c 69 62 22 0a 0a  libdir = "lib"..
26e0: 23 20 57 68 65 72 65 20 74 6f 20 69 6e 73 74 61  # Where to insta
26f0: 6c 6c 20 6d 61 6e 20 70 61 67 65 73 20 69 6e 20  ll man pages in 
2700: 60 70 72 65 66 69 78 60 20 61 62 6f 76 65 0a 23  `prefix` above.#
2710: 6d 61 6e 64 69 72 20 3d 20 22 73 68 61 72 65 2f  mandir = "share/
2720: 6d 61 6e 22 0a 0a 23 20 57 68 65 72 65 20 74 6f  man"..# Where to
2730: 20 69 6e 73 74 61 6c 6c 20 64 61 74 61 20 69 6e   install data in
2740: 20 60 70 72 65 66 69 78 60 20 61 62 6f 76 65 20   `prefix` above 
2750: 28 63 75 72 72 65 6e 74 6c 79 20 75 6e 75 73 65  (currently unuse
2760: 64 29 0a 23 64 61 74 61 64 69 72 20 3d 20 22 73  d).#datadir = "s
2770: 68 61 72 65 22 0a 0a 23 20 57 68 65 72 65 20 74  hare"..# Where t
2780: 6f 20 69 6e 73 74 61 6c 6c 20 61 64 64 69 74 69  o install additi
2790: 6f 6e 61 6c 20 69 6e 66 6f 20 69 6e 20 60 70 72  onal info in `pr
27a0: 65 66 69 78 60 20 61 62 6f 76 65 20 28 63 75 72  efix` above (cur
27b0: 72 65 6e 74 6c 79 20 75 6e 75 73 65 64 29 0a 23  rently unused).#
27c0: 69 6e 66 6f 64 69 72 20 3d 20 22 73 68 61 72 65  infodir = "share
27d0: 2f 69 6e 66 6f 22 0a 0a 23 20 57 68 65 72 65 20  /info"..# Where 
27e0: 74 6f 20 69 6e 73 74 61 6c 6c 20 6c 6f 63 61 6c  to install local
27f0: 20 73 74 61 74 65 20 28 63 75 72 72 65 6e 74 6c   state (currentl
2800: 79 20 75 6e 75 73 65 64 29 0a 23 20 49 66 20 74  y unused).# If t
2810: 68 69 73 20 69 73 20 61 20 72 65 6c 61 74 69 76  his is a relativ
2820: 65 20 70 61 74 68 2c 20 69 74 20 77 69 6c 6c 20  e path, it will 
2830: 67 65 74 20 69 6e 73 74 61 6c 6c 65 64 20 69 6e  get installed in
2840: 20 60 70 72 65 66 69 78 60 20 61 62 6f 76 65 0a   `prefix` above.
2850: 23 6c 6f 63 61 6c 73 74 61 74 65 64 69 72 20 3d  #localstatedir =
2860: 20 22 2f 76 61 72 2f 6c 69 62 22 0a 0a 23 20 3d   "/var/lib"..# =
2870: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
2880: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
2890: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
28a0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
28b0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0a 23 20 4f  ============.# O
28c0: 70 74 69 6f 6e 73 20 66 6f 72 20 63 6f 6d 70 69  ptions for compi
28d0: 6c 69 6e 67 20 52 75 73 74 20 63 6f 64 65 20 69  ling Rust code i
28e0: 74 73 65 6c 66 0a 23 20 3d 3d 3d 3d 3d 3d 3d 3d  tself.# ========
28f0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
2900: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
2910: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
2920: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
2930: 3d 3d 3d 3d 3d 0a 5b 72 75 73 74 5d 0a 0a 23 20  =====.[rust]..# 
2940: 57 68 65 74 68 65 72 20 6f 72 20 6e 6f 74 20 74  Whether or not t
2950: 6f 20 6f 70 74 69 6d 69 7a 65 20 74 68 65 20 63  o optimize the c
2960: 6f 6d 70 69 6c 65 72 20 61 6e 64 20 73 74 61 6e  ompiler and stan
2970: 64 61 72 64 20 6c 69 62 72 61 72 79 2e 0a 23 20  dard library..# 
2980: 57 41 52 4e 49 4e 47 3a 20 42 75 69 6c 64 69 6e  WARNING: Buildin
2990: 67 20 77 69 74 68 20 6f 70 74 69 6d 69 7a 65 20  g with optimize 
29a0: 3d 20 66 61 6c 73 65 20 69 73 20 4e 4f 54 20 53  = false is NOT S
29b0: 55 50 50 4f 52 54 45 44 2e 20 44 75 65 20 74 6f  UPPORTED. Due to
29c0: 20 62 6f 6f 74 73 74 72 61 70 70 69 6e 67 2c 0a   bootstrapping,.
29d0: 23 20 62 75 69 6c 64 69 6e 67 20 77 69 74 68 6f  # building witho
29e0: 75 74 20 6f 70 74 69 6d 69 7a 61 74 69 6f 6e 73  ut optimizations
29f0: 20 74 61 6b 65 73 20 6d 75 63 68 20 6c 6f 6e 67   takes much long
2a00: 65 72 20 74 68 61 6e 20 6f 70 74 69 6d 69 7a 69  er than optimizi
2a10: 6e 67 2e 20 46 75 72 74 68 65 72 2c 20 73 6f 6d  ng. Further, som
2a20: 65 20 70 6c 61 74 66 6f 72 6d 73 0a 23 20 66 61  e platforms.# fa
2a30: 69 6c 20 74 6f 20 62 75 69 6c 64 20 77 69 74 68  il to build with
2a40: 6f 75 74 20 74 68 69 73 20 6f 70 74 69 6d 69 7a  out this optimiz
2a50: 61 74 69 6f 6e 20 28 63 2e 66 2e 20 23 36 35 33  ation (c.f. #653
2a60: 35 32 29 2e 0a 23 6f 70 74 69 6d 69 7a 65 20 3d  52)..#optimize =
2a70: 20 74 72 75 65 0a 0a 23 20 49 6e 64 69 63 61 74   true..# Indicat
2a80: 65 73 20 74 68 61 74 20 74 68 65 20 62 75 69 6c  es that the buil
2a90: 64 20 73 68 6f 75 6c 64 20 62 65 20 63 6f 6e 66  d should be conf
2aa0: 69 67 75 72 65 64 20 66 6f 72 20 64 65 62 75 67  igured for debug
2ab0: 67 69 6e 67 20 52 75 73 74 2e 20 41 0a 23 20 60  ging Rust. A.# `
2ac0: 64 65 62 75 67 60 2d 65 6e 61 62 6c 65 64 20 63  debug`-enabled c
2ad0: 6f 6d 70 69 6c 65 72 20 61 6e 64 20 73 74 61 6e  ompiler and stan
2ae0: 64 61 72 64 20 6c 69 62 72 61 72 79 20 77 69 6c  dard library wil
2af0: 6c 20 62 65 20 73 6f 6d 65 77 68 61 74 0a 23 20  l be somewhat.# 
2b00: 73 6c 6f 77 65 72 20 28 64 75 65 20 74 6f 20 65  slower (due to e
2b10: 2e 67 2e 20 63 68 65 63 6b 69 6e 67 20 6f 66 20  .g. checking of 
2b20: 64 65 62 75 67 20 61 73 73 65 72 74 69 6f 6e 73  debug assertions
2b30: 29 20 62 75 74 20 73 68 6f 75 6c 64 20 72 65 6d  ) but should rem
2b40: 61 69 6e 0a 23 20 75 73 61 62 6c 65 2e 0a 23 0a  ain.# usable..#.
2b50: 23 20 4e 6f 74 65 3a 20 49 66 20 74 68 69 73 20  # Note: If this 
2b60: 76 61 6c 75 65 20 69 73 20 73 65 74 20 74 6f 20  value is set to 
2b70: 60 74 72 75 65 60 2c 20 69 74 20 77 69 6c 6c 20  `true`, it will 
2b80: 61 66 66 65 63 74 20 61 20 6e 75 6d 62 65 72 20  affect a number 
2b90: 6f 66 0a 23 20 20 20 20 20 20 20 63 6f 6e 66 69  of.#       confi
2ba0: 67 75 72 61 74 69 6f 6e 20 6f 70 74 69 6f 6e 73  guration options
2bb0: 20 62 65 6c 6f 77 20 61 73 20 77 65 6c 6c 2c 20   below as well, 
2bc0: 69 66 20 74 68 65 79 20 68 61 76 65 20 62 65 65  if they have bee
2bd0: 6e 20 6c 65 66 74 0a 23 20 20 20 20 20 20 20 75  n left.#       u
2be0: 6e 63 6f 6e 66 69 67 75 72 65 64 20 69 6e 20 74  nconfigured in t
2bf0: 68 69 73 20 66 69 6c 65 2e 0a 23 0a 23 20 4e 6f  his file..#.# No
2c00: 74 65 3a 20 63 68 61 6e 67 65 73 20 74 6f 20 74  te: changes to t
2c10: 68 65 20 60 64 65 62 75 67 60 20 73 65 74 74 69  he `debug` setti
2c20: 6e 67 20 64 6f 20 2a 6e 6f 74 2a 20 61 66 66 65  ng do *not* affe
2c30: 63 74 20 60 6f 70 74 69 6d 69 7a 65 60 0a 23 20  ct `optimize`.# 
2c40: 20 20 20 20 20 20 61 62 6f 76 65 2e 20 49 6e 20        above. In 
2c50: 74 68 65 6f 72 79 2c 20 61 20 22 6d 61 78 69 6d  theory, a "maxim
2c60: 61 6c 6c 79 20 64 65 62 75 67 67 61 62 6c 65 22  ally debuggable"
2c70: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 77 6f 75   environment wou
2c80: 6c 64 0a 23 20 20 20 20 20 20 20 73 65 74 20 60  ld.#       set `
2c90: 6f 70 74 69 6d 69 7a 65 60 20 74 6f 20 60 66 61  optimize` to `fa
2ca0: 6c 73 65 60 20 61 62 6f 76 65 20 74 6f 20 61 73  lse` above to as
2cb0: 73 69 73 74 20 74 68 65 20 69 6e 74 72 6f 73 70  sist the introsp
2cc0: 65 63 74 69 6f 6e 0a 23 20 20 20 20 20 20 20 66  ection.#       f
2cd0: 61 63 69 6c 69 74 69 65 73 20 6f 66 20 64 65 62  acilities of deb
2ce0: 75 67 67 65 72 73 20 6c 69 6b 65 20 6c 6c 64 62  uggers like lldb
2cf0: 20 61 6e 64 20 67 64 62 2e 20 54 6f 20 72 65 63   and gdb. To rec
2d00: 72 65 61 74 65 20 73 75 63 68 20 61 6e 0a 23 20  reate such an.# 
2d10: 20 20 20 20 20 20 65 6e 76 69 72 6f 6e 6d 65 6e        environmen
2d20: 74 2c 20 65 78 70 6c 69 63 69 74 6c 79 20 73 65  t, explicitly se
2d30: 74 20 60 6f 70 74 69 6d 69 7a 65 60 20 74 6f 20  t `optimize` to 
2d40: 60 66 61 6c 73 65 60 20 61 6e 64 20 60 64 65 62  `false` and `deb
2d50: 75 67 60 0a 23 20 20 20 20 20 20 20 74 6f 20 60  ug`.#       to `
2d60: 74 72 75 65 60 2e 20 49 6e 20 70 72 61 63 74 69  true`. In practi
2d70: 63 65 2c 20 65 76 65 72 79 6f 6e 65 20 6c 65 61  ce, everyone lea
2d80: 76 65 73 20 60 6f 70 74 69 6d 69 7a 65 60 20 73  ves `optimize` s
2d90: 65 74 20 74 6f 0a 23 20 20 20 20 20 20 20 60 74  et to.#       `t
2da0: 72 75 65 60 2c 20 62 65 63 61 75 73 65 20 61 6e  rue`, because an
2db0: 20 75 6e 6f 70 74 69 6d 69 7a 65 64 20 72 75 73   unoptimized rus
2dc0: 74 63 20 77 69 74 68 20 64 65 62 75 67 67 69 6e  tc with debuggin
2dd0: 67 0a 23 20 20 20 20 20 20 20 65 6e 61 62 6c 65  g.#       enable
2de0: 64 20 62 65 63 6f 6d 65 73 20 2a 75 6e 75 73 61  d becomes *unusa
2df0: 62 6c 79 20 73 6c 6f 77 2a 20 28 65 2e 67 2e 20  bly slow* (e.g. 
2e00: 72 75 73 74 2d 6c 61 6e 67 2f 72 75 73 74 23 32  rust-lang/rust#2
2e10: 34 38 34 30 0a 23 20 20 20 20 20 20 20 72 65 70  4840.#       rep
2e20: 6f 72 74 65 64 20 61 20 32 35 78 20 73 6c 6f 77  orted a 25x slow
2e30: 64 6f 77 6e 29 20 61 6e 64 20 62 6f 6f 74 73 74  down) and bootst
2e40: 72 61 70 70 69 6e 67 20 74 68 65 20 73 75 70 70  rapping the supp
2e50: 6f 73 65 64 0a 23 20 20 20 20 20 20 20 22 6d 61  osed.#       "ma
2e60: 78 69 6d 61 6c 6c 79 20 64 65 62 75 67 67 61 62  ximally debuggab
2e70: 6c 65 22 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20  le" environment 
2e80: 28 6e 6f 74 61 62 6c 79 20 6c 69 62 73 74 64 29  (notably libstd)
2e90: 20 74 61 6b 65 73 0a 23 20 20 20 20 20 20 20 68   takes.#       h
2ea0: 6f 75 72 73 20 74 6f 20 62 75 69 6c 64 2e 0a 23  ours to build..#
2eb0: 0a 23 64 65 62 75 67 20 3d 20 66 61 6c 73 65 0a  .#debug = false.
2ec0: 0a 23 20 4e 75 6d 62 65 72 20 6f 66 20 63 6f 64  .# Number of cod
2ed0: 65 67 65 6e 20 75 6e 69 74 73 20 74 6f 20 75 73  egen units to us
2ee0: 65 20 66 6f 72 20 65 61 63 68 20 63 6f 6d 70 69  e for each compi
2ef0: 6c 65 72 20 69 6e 76 6f 63 61 74 69 6f 6e 2e 20  ler invocation. 
2f00: 41 20 76 61 6c 75 65 20 6f 66 20 30 0a 23 20 6d  A value of 0.# m
2f10: 65 61 6e 73 20 22 74 68 65 20 6e 75 6d 62 65 72  eans "the number
2f20: 20 6f 66 20 63 6f 72 65 73 20 6f 6e 20 74 68 69   of cores on thi
2f30: 73 20 6d 61 63 68 69 6e 65 22 2c 20 61 6e 64 20  s machine", and 
2f40: 31 2b 20 69 73 20 70 61 73 73 65 64 20 74 68 72  1+ is passed thr
2f50: 6f 75 67 68 20 74 6f 20 74 68 65 0a 23 20 63 6f  ough to the.# co
2f60: 6d 70 69 6c 65 72 2e 0a 23 63 6f 64 65 67 65 6e  mpiler..#codegen
2f70: 2d 75 6e 69 74 73 20 3d 20 31 0a 0a 23 20 53 65  -units = 1..# Se
2f80: 74 73 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66  ts the number of
2f90: 20 63 6f 64 65 67 65 6e 20 75 6e 69 74 73 20 74   codegen units t
2fa0: 6f 20 62 75 69 6c 64 20 74 68 65 20 73 74 61 6e  o build the stan
2fb0: 64 61 72 64 20 6c 69 62 72 61 72 79 20 77 69 74  dard library wit
2fc0: 68 2c 0a 23 20 72 65 67 61 72 64 6c 65 73 73 20  h,.# regardless 
2fd0: 6f 66 20 77 68 61 74 20 74 68 65 20 63 6f 64 65  of what the code
2fe0: 67 65 6e 2d 75 6e 69 74 20 73 65 74 74 69 6e 67  gen-unit setting
2ff0: 20 66 6f 72 20 74 68 65 20 72 65 73 74 20 6f 66   for the rest of
3000: 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 20 69 73   the compiler is
3010: 2e 0a 23 63 6f 64 65 67 65 6e 2d 75 6e 69 74 73  ..#codegen-units
3020: 2d 73 74 64 20 3d 20 31 0a 0a 23 20 57 68 65 74  -std = 1..# Whet
3030: 68 65 72 20 6f 72 20 6e 6f 74 20 64 65 62 75 67  her or not debug
3040: 20 61 73 73 65 72 74 69 6f 6e 73 20 61 72 65 20   assertions are 
3050: 65 6e 61 62 6c 65 64 20 66 6f 72 20 74 68 65 20  enabled for the 
3060: 63 6f 6d 70 69 6c 65 72 20 61 6e 64 20 73 74 61  compiler and sta
3070: 6e 64 61 72 64 0a 23 20 6c 69 62 72 61 72 79 2e  ndard.# library.
3080: 0a 23 64 65 62 75 67 2d 61 73 73 65 72 74 69 6f  .#debug-assertio
3090: 6e 73 20 3d 20 66 61 6c 73 65 0a 0a 23 20 44 65  ns = false..# De
30a0: 62 75 67 69 6e 66 6f 20 6c 65 76 65 6c 20 66 6f  buginfo level fo
30b0: 72 20 6d 6f 73 74 20 6f 66 20 52 75 73 74 20 63  r most of Rust c
30c0: 6f 64 65 2c 20 63 6f 72 72 65 73 70 6f 6e 64 73  ode, corresponds
30d0: 20 74 6f 20 74 68 65 20 60 2d 43 20 64 65 62 75   to the `-C debu
30e0: 67 69 6e 66 6f 3d 4e 60 20 6f 70 74 69 6f 6e 20  ginfo=N` option 
30f0: 6f 66 20 60 72 75 73 74 63 60 2e 0a 23 20 60 30  of `rustc`..# `0
3100: 60 20 2d 20 6e 6f 20 64 65 62 75 67 20 69 6e 66  ` - no debug inf
3110: 6f 0a 23 20 60 31 60 20 2d 20 6c 69 6e 65 20 74  o.# `1` - line t
3120: 61 62 6c 65 73 20 6f 6e 6c 79 0a 23 20 60 32 60  ables only.# `2`
3130: 20 2d 20 66 75 6c 6c 20 64 65 62 75 67 20 69 6e   - full debug in
3140: 66 6f 20 77 69 74 68 20 76 61 72 69 61 62 6c 65  fo with variable
3150: 20 61 6e 64 20 74 79 70 65 20 69 6e 66 6f 72 6d   and type inform
3160: 61 74 69 6f 6e 0a 23 20 43 61 6e 20 62 65 20 6f  ation.# Can be o
3170: 76 65 72 72 69 64 65 6e 20 66 6f 72 20 73 70 65  verriden for spe
3180: 63 69 66 69 63 20 73 75 62 73 65 74 73 20 6f 66  cific subsets of
3190: 20 52 75 73 74 20 63 6f 64 65 20 28 72 75 73 74   Rust code (rust
31a0: 63 2c 20 73 74 64 20 6f 72 20 74 6f 6f 6c 73 29  c, std or tools)
31b0: 2e 0a 23 20 44 65 62 75 67 69 6e 66 6f 20 66 6f  ..# Debuginfo fo
31c0: 72 20 74 65 73 74 73 20 72 75 6e 20 77 69 74 68  r tests run with
31d0: 20 63 6f 6d 70 69 6c 65 74 65 73 74 20 69 73 20   compiletest is 
31e0: 6e 6f 74 20 63 6f 6e 74 72 6f 6c 6c 65 64 20 62  not controlled b
31f0: 79 20 74 68 69 73 20 6f 70 74 69 6f 6e 0a 23 20  y this option.# 
3200: 61 6e 64 20 6e 65 65 64 73 20 74 6f 20 62 65 20  and needs to be 
3210: 65 6e 61 62 6c 65 64 20 73 65 70 61 72 61 74 65  enabled separate
3220: 6c 79 20 77 69 74 68 20 60 64 65 62 75 67 69 6e  ly with `debugin
3230: 66 6f 2d 6c 65 76 65 6c 2d 74 65 73 74 73 60 2e  fo-level-tests`.
3240: 0a 23 64 65 62 75 67 69 6e 66 6f 2d 6c 65 76 65  .#debuginfo-leve
3250: 6c 20 3d 20 69 66 20 64 65 62 75 67 20 7b 20 32  l = if debug { 2
3260: 20 7d 20 65 6c 73 65 20 7b 20 30 20 7d 0a 0a 23   } else { 0 }..#
3270: 20 44 65 62 75 67 69 6e 66 6f 20 6c 65 76 65 6c   Debuginfo level
3280: 20 66 6f 72 20 74 68 65 20 63 6f 6d 70 69 6c 65   for the compile
3290: 72 2e 0a 23 64 65 62 75 67 69 6e 66 6f 2d 6c 65  r..#debuginfo-le
32a0: 76 65 6c 2d 72 75 73 74 63 20 3d 20 64 65 62 75  vel-rustc = debu
32b0: 67 69 6e 66 6f 2d 6c 65 76 65 6c 0a 0a 23 20 44  ginfo-level..# D
32c0: 65 62 75 67 69 6e 66 6f 20 6c 65 76 65 6c 20 66  ebuginfo level f
32d0: 6f 72 20 74 68 65 20 73 74 61 6e 64 61 72 64 20  or the standard 
32e0: 6c 69 62 72 61 72 79 2e 0a 23 64 65 62 75 67 69  library..#debugi
32f0: 6e 66 6f 2d 6c 65 76 65 6c 2d 73 74 64 20 3d 20  nfo-level-std = 
3300: 64 65 62 75 67 69 6e 66 6f 2d 6c 65 76 65 6c 0a  debuginfo-level.
3310: 0a 23 20 44 65 62 75 67 69 6e 66 6f 20 6c 65 76  .# Debuginfo lev
3320: 65 6c 20 66 6f 72 20 74 68 65 20 74 6f 6f 6c 73  el for the tools
3330: 2e 0a 23 64 65 62 75 67 69 6e 66 6f 2d 6c 65 76  ..#debuginfo-lev
3340: 65 6c 2d 74 6f 6f 6c 73 20 3d 20 64 65 62 75 67  el-tools = debug
3350: 69 6e 66 6f 2d 6c 65 76 65 6c 0a 0a 23 20 44 65  info-level..# De
3360: 62 75 67 69 6e 66 6f 20 6c 65 76 65 6c 20 66 6f  buginfo level fo
3370: 72 20 74 68 65 20 74 65 73 74 20 73 75 69 74 65  r the test suite
3380: 73 20 72 75 6e 20 77 69 74 68 20 63 6f 6d 70 69  s run with compi
3390: 6c 65 74 65 73 74 2e 0a 23 20 46 49 58 4d 45 28  letest..# FIXME(
33a0: 23 36 31 31 31 37 29 3a 20 53 6f 6d 65 20 74 65  #61117): Some te
33b0: 73 74 73 20 66 61 69 6c 20 77 68 65 6e 20 74 68  sts fail when th
33c0: 69 73 20 6f 70 74 69 6f 6e 20 69 73 20 65 6e 61  is option is ena
33d0: 62 6c 65 64 2e 0a 23 64 65 62 75 67 69 6e 66 6f  bled..#debuginfo
33e0: 2d 6c 65 76 65 6c 2d 74 65 73 74 73 20 3d 20 30  -level-tests = 0
33f0: 0a 0a 23 20 57 68 65 74 68 65 72 20 6f 72 20 6e  ..# Whether or n
3400: 6f 74 20 60 70 61 6e 69 63 21 60 73 20 67 65 6e  ot `panic!`s gen
3410: 65 72 61 74 65 20 62 61 63 6b 74 72 61 63 65 73  erate backtraces
3420: 20 28 52 55 53 54 5f 42 41 43 4b 54 52 41 43 45   (RUST_BACKTRACE
3430: 29 0a 23 62 61 63 6b 74 72 61 63 65 20 3d 20 74  ).#backtrace = t
3440: 72 75 65 0a 0a 23 20 57 68 65 74 68 65 72 20 74  rue..# Whether t
3450: 6f 20 61 6c 77 61 79 73 20 75 73 65 20 69 6e 63  o always use inc
3460: 72 65 6d 65 6e 74 61 6c 20 63 6f 6d 70 69 6c 61  remental compila
3470: 74 69 6f 6e 20 77 68 65 6e 20 62 75 69 6c 64 69  tion when buildi
3480: 6e 67 20 72 75 73 74 63 0a 23 69 6e 63 72 65 6d  ng rustc.#increm
3490: 65 6e 74 61 6c 20 3d 20 66 61 6c 73 65 0a 0a 23  ental = false..#
34a0: 20 42 75 69 6c 64 20 61 20 6d 75 6c 74 69 2d 74   Build a multi-t
34b0: 68 72 65 61 64 65 64 20 72 75 73 74 63 0a 23 70  hreaded rustc.#p
34c0: 61 72 61 6c 6c 65 6c 2d 63 6f 6d 70 69 6c 65 72  arallel-compiler
34d0: 20 3d 20 66 61 6c 73 65 0a 0a 23 20 54 68 65 20   = false..# The 
34e0: 64 65 66 61 75 6c 74 20 6c 69 6e 6b 65 72 20 74  default linker t
34f0: 68 61 74 20 77 69 6c 6c 20 62 65 20 68 61 72 64  hat will be hard
3500: 2d 63 6f 64 65 64 20 69 6e 74 6f 20 74 68 65 20  -coded into the 
3510: 67 65 6e 65 72 61 74 65 64 20 63 6f 6d 70 69 6c  generated compil
3520: 65 72 20 66 6f 72 0a 23 20 74 61 72 67 65 74 73  er for.# targets
3530: 20 74 68 61 74 20 64 6f 6e 27 74 20 73 70 65 63   that don't spec
3540: 69 66 79 20 6c 69 6e 6b 65 72 20 65 78 70 6c 69  ify linker expli
3550: 63 69 74 6c 79 20 69 6e 20 74 68 65 69 72 20 74  citly in their t
3560: 61 72 67 65 74 20 73 70 65 63 69 66 69 63 61 74  arget specificat
3570: 69 6f 6e 73 2e 0a 23 20 4e 6f 74 65 20 74 68 61  ions..# Note tha
3580: 74 20 74 68 69 73 20 69 73 20 6e 6f 74 20 74 68  t this is not th
3590: 65 20 6c 69 6e 6b 65 72 20 75 73 65 64 20 74 6f  e linker used to
35a0: 20 6c 69 6e 6b 20 73 61 69 64 20 63 6f 6d 70 69   link said compi
35b0: 6c 65 72 2e 0a 23 64 65 66 61 75 6c 74 2d 6c 69  ler..#default-li
35c0: 6e 6b 65 72 20 3d 20 22 63 63 22 0a 0a 23 20 54  nker = "cc"..# T
35d0: 68 65 20 22 63 68 61 6e 6e 65 6c 22 20 66 6f 72  he "channel" for
35e0: 20 74 68 65 20 52 75 73 74 20 62 75 69 6c 64 20   the Rust build 
35f0: 74 6f 20 70 72 6f 64 75 63 65 2e 20 54 68 65 20  to produce. The 
3600: 73 74 61 62 6c 65 2f 62 65 74 61 20 63 68 61 6e  stable/beta chan
3610: 6e 65 6c 73 20 6f 6e 6c 79 0a 23 20 61 6c 6c 6f  nels only.# allo
3620: 77 20 75 73 69 6e 67 20 73 74 61 62 6c 65 20 66  w using stable f
3630: 65 61 74 75 72 65 73 2c 20 77 68 65 72 65 61 73  eatures, whereas
3640: 20 74 68 65 20 6e 69 67 68 74 6c 79 20 61 6e 64   the nightly and
3650: 20 64 65 76 20 63 68 61 6e 6e 65 6c 73 20 61 6c   dev channels al
3660: 6c 6f 77 20 75 73 69 6e 67 0a 23 20 6e 69 67 68  low using.# nigh
3670: 74 6c 79 20 66 65 61 74 75 72 65 73 0a 23 63 68  tly features.#ch
3680: 61 6e 6e 65 6c 20 3d 20 22 64 65 76 22 0a 0a 23  annel = "dev"..#
3690: 20 54 68 65 20 72 6f 6f 74 20 6c 6f 63 61 74 69   The root locati
36a0: 6f 6e 20 6f 66 20 74 68 65 20 4d 55 53 4c 20 69  on of the MUSL i
36b0: 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 64 69 72 65  nstallation dire
36c0: 63 74 6f 72 79 2e 0a 23 6d 75 73 6c 2d 72 6f 6f  ctory..#musl-roo
36d0: 74 20 3d 20 22 2e 2e 2e 22 0a 0a 23 20 42 79 20  t = "..."..# By 
36e0: 64 65 66 61 75 6c 74 20 74 68 65 20 60 72 75 73  default the `rus
36f0: 74 63 60 20 65 78 65 63 75 74 61 62 6c 65 20 69  tc` executable i
3700: 73 20 62 75 69 6c 74 20 77 69 74 68 20 60 2d 57  s built with `-W
3710: 6c 2c 2d 72 70 61 74 68 60 20 66 6c 61 67 73 20  l,-rpath` flags 
3720: 6f 6e 20 55 6e 69 78 0a 23 20 70 6c 61 74 66 6f  on Unix.# platfo
3730: 72 6d 73 20 74 6f 20 65 6e 73 75 72 65 20 74 68  rms to ensure th
3740: 61 74 20 74 68 65 20 63 6f 6d 70 69 6c 65 72 20  at the compiler 
3750: 69 73 20 75 73 61 62 6c 65 20 62 79 20 64 65 66  is usable by def
3760: 61 75 6c 74 20 66 72 6f 6d 20 74 68 65 20 62 75  ault from the bu
3770: 69 6c 64 0a 23 20 64 69 72 65 63 74 6f 72 79 20  ild.# directory 
3780: 28 61 73 20 69 74 20 6c 69 6e 6b 73 20 74 6f 20  (as it links to 
3790: 61 20 6e 75 6d 62 65 72 20 6f 66 20 64 79 6e 61  a number of dyna
37a0: 6d 69 63 20 6c 69 62 72 61 72 69 65 73 29 2e 20  mic libraries). 
37b0: 54 68 69 73 20 6d 61 79 20 6e 6f 74 20 62 65 0a  This may not be.
37c0: 23 20 64 65 73 69 72 65 64 20 69 6e 20 64 69 73  # desired in dis
37d0: 74 72 69 62 75 74 69 6f 6e 73 2c 20 66 6f 72 20  tributions, for 
37e0: 65 78 61 6d 70 6c 65 2e 0a 23 72 70 61 74 68 20  example..#rpath 
37f0: 3d 20 74 72 75 65 0a 0a 23 20 45 6d 69 74 73 20  = true..# Emits 
3800: 65 78 74 72 61 6e 65 6f 75 73 20 6f 75 74 70 75  extraneous outpu
3810: 74 20 66 72 6f 6d 20 74 65 73 74 73 20 74 6f 20  t from tests to 
3820: 65 6e 73 75 72 65 20 74 68 61 74 20 66 61 69 6c  ensure that fail
3830: 75 72 65 73 20 6f 66 20 74 68 65 20 74 65 73 74  ures of the test
3840: 0a 23 20 68 61 72 6e 65 73 73 20 61 72 65 20 64  .# harness are d
3850: 65 62 75 67 67 61 62 6c 65 20 6a 75 73 74 20 66  ebuggable just f
3860: 72 6f 6d 20 6c 6f 67 66 69 6c 65 73 2e 0a 23 76  rom logfiles..#v
3870: 65 72 62 6f 73 65 2d 74 65 73 74 73 20 3d 20 66  erbose-tests = f
3880: 61 6c 73 65 0a 0a 23 20 46 6c 61 67 20 69 6e 64  alse..# Flag ind
3890: 69 63 61 74 69 6e 67 20 77 68 65 74 68 65 72 20  icating whether 
38a0: 74 65 73 74 73 20 61 72 65 20 63 6f 6d 70 69 6c  tests are compil
38b0: 65 64 20 77 69 74 68 20 6f 70 74 69 6d 69 7a 61  ed with optimiza
38c0: 74 69 6f 6e 73 20 28 74 68 65 20 2d 4f 20 66 6c  tions (the -O fl
38d0: 61 67 29 2e 0a 23 6f 70 74 69 6d 69 7a 65 2d 74  ag)..#optimize-t
38e0: 65 73 74 73 20 3d 20 74 72 75 65 0a 0a 23 20 46  ests = true..# F
38f0: 6c 61 67 20 69 6e 64 69 63 61 74 69 6e 67 20 77  lag indicating w
3900: 68 65 74 68 65 72 20 63 6f 64 65 67 65 6e 20 74  hether codegen t
3910: 65 73 74 73 20 77 69 6c 6c 20 62 65 20 72 75 6e  ests will be run
3920: 20 6f 72 20 6e 6f 74 2e 20 49 66 20 79 6f 75 20   or not. If you 
3930: 67 65 74 20 61 6e 20 65 72 72 6f 72 0a 23 20 73  get an error.# s
3940: 61 79 69 6e 67 20 74 68 61 74 20 74 68 65 20 46  aying that the F
3950: 69 6c 65 43 68 65 63 6b 20 65 78 65 63 75 74 61  ileCheck executa
3960: 62 6c 65 20 69 73 20 6d 69 73 73 69 6e 67 2c 20  ble is missing, 
3970: 79 6f 75 20 6d 61 79 20 77 61 6e 74 20 74 6f 20  you may want to 
3980: 64 69 73 61 62 6c 65 20 74 68 69 73 2e 0a 23 20  disable this..# 
3990: 41 6c 73 6f 20 73 65 65 20 74 68 65 20 74 61 72  Also see the tar
39a0: 67 65 74 27 73 20 6c 6c 76 6d 2d 66 69 6c 65 63  get's llvm-filec
39b0: 68 65 63 6b 20 6f 70 74 69 6f 6e 2e 0a 23 63 6f  heck option..#co
39c0: 64 65 67 65 6e 2d 74 65 73 74 73 20 3d 20 74 72  degen-tests = tr
39d0: 75 65 0a 0a 23 20 46 6c 61 67 20 69 6e 64 69 63  ue..# Flag indic
39e0: 61 74 69 6e 67 20 77 68 65 74 68 65 72 20 67 69  ating whether gi
39f0: 74 20 69 6e 66 6f 20 77 69 6c 6c 20 62 65 20 72  t info will be r
3a00: 65 74 72 69 65 76 65 64 20 66 72 6f 6d 20 2e 67  etrieved from .g
3a10: 69 74 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79  it automatically
3a20: 2e 0a 23 20 48 61 76 69 6e 67 20 74 68 65 20 67  ..# Having the g
3a30: 69 74 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 63  it information c
3a40: 61 6e 20 63 61 75 73 65 20 61 20 6c 6f 74 20 6f  an cause a lot o
3a50: 66 20 72 65 62 75 69 6c 64 73 20 64 75 72 69 6e  f rebuilds durin
3a60: 67 20 64 65 76 65 6c 6f 70 6d 65 6e 74 2e 0a 23  g development..#
3a70: 20 4e 6f 74 65 3a 20 49 66 20 74 68 69 73 20 61   Note: If this a
3a80: 74 74 72 69 62 75 74 65 20 69 73 20 6e 6f 74 20  ttribute is not 
3a90: 65 78 70 6c 69 63 69 74 6c 79 20 73 65 74 20 28  explicitly set (
3aa0: 65 2e 67 2e 20 69 66 20 6c 65 66 74 20 63 6f 6d  e.g. if left com
3ab0: 6d 65 6e 74 65 64 20 6f 75 74 29 20 69 74 0a 23  mented out) it.#
3ac0: 20 77 69 6c 6c 20 64 65 66 61 75 6c 74 20 74 6f   will default to
3ad0: 20 74 72 75 65 20 69 66 20 63 68 61 6e 6e 65 6c   true if channel
3ae0: 20 3d 20 22 64 65 76 22 2c 20 62 75 74 20 77 69   = "dev", but wi
3af0: 6c 6c 20 64 65 66 61 75 6c 74 20 74 6f 20 66 61  ll default to fa
3b00: 6c 73 65 20 6f 74 68 65 72 77 69 73 65 2e 0a 23  lse otherwise..#
3b10: 69 67 6e 6f 72 65 2d 67 69 74 20 3d 20 74 72 75  ignore-git = tru
3b20: 65 0a 0a 23 20 57 68 65 6e 20 63 72 65 61 74 69  e..# When creati
3b30: 6e 67 20 73 6f 75 72 63 65 20 74 61 72 62 61 6c  ng source tarbal
3b40: 6c 73 20 77 68 65 74 68 65 72 20 6f 72 20 6e 6f  ls whether or no
3b50: 74 20 74 6f 20 63 72 65 61 74 65 20 61 20 73 6f  t to create a so
3b60: 75 72 63 65 20 74 61 72 62 61 6c 6c 2e 0a 23 64  urce tarball..#d
3b70: 69 73 74 2d 73 72 63 20 3d 20 66 61 6c 73 65 0a  ist-src = false.
3b80: 0a 23 20 41 66 74 65 72 20 62 75 69 6c 64 69 6e  .# After buildin
3b90: 67 20 6f 72 20 74 65 73 74 69 6e 67 20 65 78 74  g or testing ext
3ba0: 65 6e 64 65 64 20 74 6f 6f 6c 73 20 28 65 2e 67  ended tools (e.g
3bb0: 2e 20 63 6c 69 70 70 79 20 61 6e 64 20 72 75 73  . clippy and rus
3bc0: 74 66 6d 74 29 2c 20 61 70 70 65 6e 64 20 74 68  tfmt), append th
3bd0: 65 0a 23 20 72 65 73 75 6c 74 20 28 62 72 6f 6b  e.# result (brok
3be0: 65 6e 2c 20 63 6f 6d 70 69 6c 69 6e 67 2c 20 74  en, compiling, t
3bf0: 65 73 74 69 6e 67 29 20 69 6e 74 6f 20 74 68 69  esting) into thi
3c00: 73 20 4a 53 4f 4e 20 66 69 6c 65 2e 0a 23 73 61  s JSON file..#sa
3c10: 76 65 2d 74 6f 6f 6c 73 74 61 74 65 73 20 3d 20  ve-toolstates = 
3c20: 22 2f 70 61 74 68 2f 74 6f 2f 74 6f 6f 6c 73 74  "/path/to/toolst
3c30: 61 74 65 73 2e 6a 73 6f 6e 22 0a 0a 23 20 54 68  ates.json"..# Th
3c40: 69 73 20 69 73 20 61 6e 20 61 72 72 61 79 20 6f  is is an array o
3c50: 66 20 74 68 65 20 63 6f 64 65 67 65 6e 20 62 61  f the codegen ba
3c60: 63 6b 65 6e 64 73 20 74 68 61 74 20 77 69 6c 6c  ckends that will
3c70: 20 62 65 20 63 6f 6d 70 69 6c 65 64 20 66 6f 72   be compiled for
3c80: 20 74 68 65 20 72 75 73 74 63 0a 23 20 74 68 61   the rustc.# tha
3c90: 74 27 73 20 62 65 69 6e 67 20 63 6f 6d 70 69 6c  t's being compil
3ca0: 65 64 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20  ed. The default 
3cb0: 69 73 20 74 6f 20 6f 6e 6c 79 20 62 75 69 6c 64  is to only build
3cc0: 20 74 68 65 20 4c 4c 56 4d 20 63 6f 64 65 67 65   the LLVM codege
3cd0: 6e 20 62 61 63 6b 65 6e 64 2c 0a 23 20 61 6e 64  n backend,.# and
3ce0: 20 63 75 72 72 65 6e 74 6c 79 20 74 68 65 20 6f   currently the o
3cf0: 6e 6c 79 20 73 74 61 6e 64 61 72 64 20 6f 70 74  nly standard opt
3d00: 69 6f 6e 20 73 75 70 70 6f 72 74 65 64 20 69 73  ion supported is
3d10: 20 60 22 6c 6c 76 6d 22 60 0a 23 63 6f 64 65 67   `"llvm"`.#codeg
3d20: 65 6e 2d 62 61 63 6b 65 6e 64 73 20 3d 20 5b 22  en-backends = ["
3d30: 6c 6c 76 6d 22 5d 0a 0a 23 20 49 6e 64 69 63 61  llvm"]..# Indica
3d40: 74 65 73 20 77 68 65 74 68 65 72 20 4c 4c 44 20  tes whether LLD 
3d50: 77 69 6c 6c 20 62 65 20 63 6f 6d 70 69 6c 65 64  will be compiled
3d60: 20 61 6e 64 20 6d 61 64 65 20 61 76 61 69 6c 61   and made availa
3d70: 62 6c 65 20 69 6e 20 74 68 65 20 73 79 73 72 6f  ble in the sysro
3d80: 6f 74 20 66 6f 72 0a 23 20 72 75 73 74 63 20 74  ot for.# rustc t
3d90: 6f 20 65 78 65 63 75 74 65 2e 0a 23 6c 6c 64 20  o execute..#lld 
3da0: 3d 20 66 61 6c 73 65 0a 0a 23 20 49 6e 64 69 63  = false..# Indic
3db0: 61 74 65 73 20 77 68 65 74 68 65 72 20 73 6f 6d  ates whether som
3dc0: 65 20 4c 4c 56 4d 20 74 6f 6f 6c 73 2c 20 6c 69  e LLVM tools, li
3dd0: 6b 65 20 6c 6c 76 6d 2d 6f 62 6a 64 75 6d 70 2c  ke llvm-objdump,
3de0: 20 77 69 6c 6c 20 62 65 20 6d 61 64 65 20 61 76   will be made av
3df0: 61 69 6c 61 62 6c 65 20 69 6e 20 74 68 65 0a 23  ailable in the.#
3e00: 20 73 79 73 72 6f 6f 74 2e 0a 23 6c 6c 76 6d 2d   sysroot..#llvm-
3e10: 74 6f 6f 6c 73 20 3d 20 66 61 6c 73 65 0a 0a 23  tools = false..#
3e20: 20 49 6e 64 69 63 61 74 65 73 20 77 68 65 74 68   Indicates wheth
3e30: 65 72 20 4c 4c 44 42 20 77 69 6c 6c 20 62 65 20  er LLDB will be 
3e40: 6d 61 64 65 20 61 76 61 69 6c 61 62 6c 65 20 69  made available i
3e50: 6e 20 74 68 65 20 73 79 73 72 6f 6f 74 2e 0a 23  n the sysroot..#
3e60: 20 54 68 69 73 20 69 73 20 6f 6e 6c 79 20 62 75   This is only bu
3e70: 69 6c 74 20 69 66 20 4c 4c 56 4d 20 69 73 20 61  ilt if LLVM is a
3e80: 6c 73 6f 20 62 65 69 6e 67 20 62 75 69 6c 74 2e  lso being built.
3e90: 0a 23 6c 6c 64 62 20 3d 20 66 61 6c 73 65 0a 0a  .#lldb = false..
3ea0: 23 20 57 68 65 74 68 65 72 20 74 6f 20 64 65 6e  # Whether to den
3eb0: 79 20 77 61 72 6e 69 6e 67 73 20 69 6e 20 63 72  y warnings in cr
3ec0: 61 74 65 73 0a 23 64 65 6e 79 2d 77 61 72 6e 69  ates.#deny-warni
3ed0: 6e 67 73 20 3d 20 74 72 75 65 0a 0a 23 20 50 72  ngs = true..# Pr
3ee0: 69 6e 74 20 62 61 63 6b 74 72 61 63 65 20 6f 6e  int backtrace on
3ef0: 20 69 6e 74 65 72 6e 61 6c 20 63 6f 6d 70 69 6c   internal compil
3f00: 65 72 20 65 72 72 6f 72 73 20 64 75 72 69 6e 67  er errors during
3f10: 20 62 6f 6f 74 73 74 72 61 70 0a 23 62 61 63 6b   bootstrap.#back
3f20: 74 72 61 63 65 2d 6f 6e 2d 69 63 65 20 3d 20 66  trace-on-ice = f
3f30: 61 6c 73 65 0a 0a 23 20 57 68 65 74 68 65 72 20  alse..# Whether 
3f40: 74 6f 20 76 65 72 69 66 79 20 67 65 6e 65 72 61  to verify genera
3f50: 74 65 64 20 4c 4c 56 4d 20 49 52 0a 23 76 65 72  ted LLVM IR.#ver
3f60: 69 66 79 2d 6c 6c 76 6d 2d 69 72 20 3d 20 66 61  ify-llvm-ir = fa
3f70: 6c 73 65 0a 0a 23 20 4d 61 70 20 61 6c 6c 20 64  lse..# Map all d
3f80: 65 62 75 67 69 6e 66 6f 20 70 61 74 68 73 20 66  ebuginfo paths f
3f90: 6f 72 20 6c 69 62 73 74 64 20 61 6e 64 20 63 72  or libstd and cr
3fa0: 61 74 65 73 20 74 6f 20 60 2f 72 75 73 74 2f 24  ates to `/rust/$
3fb0: 73 68 61 2f 24 63 72 61 74 65 2f 2e 2e 2e 60 2c  sha/$crate/...`,
3fc0: 0a 23 20 67 65 6e 65 72 61 6c 6c 79 20 6f 6e 6c  .# generally onl
3fd0: 79 20 73 65 74 20 66 6f 72 20 72 65 6c 65 61 73  y set for releas
3fe0: 65 73 0a 23 72 65 6d 61 70 2d 64 65 62 75 67 69  es.#remap-debugi
3ff0: 6e 66 6f 20 3d 20 66 61 6c 73 65 0a 0a 23 20 4c  nfo = false..# L
4000: 69 6e 6b 20 74 68 65 20 63 6f 6d 70 69 6c 65 72  ink the compiler
4010: 20 61 67 61 69 6e 73 74 20 60 6a 65 6d 61 6c 6c   against `jemall
4020: 6f 63 60 2c 20 77 68 65 72 65 20 6f 6e 20 4c 69  oc`, where on Li
4030: 6e 75 78 20 61 6e 64 20 4f 53 58 20 69 74 20 73  nux and OSX it s
4040: 68 6f 75 6c 64 0a 23 20 6f 76 65 72 72 69 64 65  hould.# override
4050: 20 74 68 65 20 64 65 66 61 75 6c 74 20 61 6c 6c   the default all
4060: 6f 63 61 74 6f 72 20 66 6f 72 20 72 75 73 74 63  ocator for rustc
4070: 20 61 6e 64 20 4c 4c 56 4d 2e 0a 23 6a 65 6d 61   and LLVM..#jema
4080: 6c 6c 6f 63 20 3d 20 66 61 6c 73 65 0a 0a 23 20  lloc = false..# 
4090: 52 75 6e 20 74 65 73 74 73 20 69 6e 20 76 61 72  Run tests in var
40a0: 69 6f 75 73 20 74 65 73 74 20 73 75 69 74 65 73  ious test suites
40b0: 20 77 69 74 68 20 74 68 65 20 22 6e 6c 6c 20 63   with the "nll c
40c0: 6f 6d 70 61 72 65 20 6d 6f 64 65 22 20 69 6e 20  ompare mode" in 
40d0: 61 64 64 69 74 69 6f 6e 20 74 6f 0a 23 20 72 75  addition to.# ru
40e0: 6e 6e 69 6e 67 20 74 68 65 20 74 65 73 74 73 20  nning the tests 
40f0: 69 6e 20 6e 6f 72 6d 61 6c 20 6d 6f 64 65 2e 20  in normal mode. 
4100: 4c 61 72 67 65 6c 79 20 6f 6e 6c 79 20 75 73 65  Largely only use
4110: 64 20 6f 6e 20 43 49 20 61 6e 64 20 64 75 72 69  d on CI and duri
4120: 6e 67 20 6c 6f 63 61 6c 0a 23 20 64 65 76 65 6c  ng local.# devel
4130: 6f 70 6d 65 6e 74 20 6f 66 20 4e 4c 4c 0a 23 74  opment of NLL.#t
4140: 65 73 74 2d 63 6f 6d 70 61 72 65 2d 6d 6f 64 65  est-compare-mode
4150: 20 3d 20 66 61 6c 73 65 0a 0a 23 20 55 73 65 20   = false..# Use 
4160: 4c 4c 56 4d 20 6c 69 62 75 6e 77 69 6e 64 20 61  LLVM libunwind a
4170: 73 20 74 68 65 20 69 6d 70 6c 65 6d 65 6e 74 61  s the implementa
4180: 74 69 6f 6e 20 66 6f 72 20 52 75 73 74 27 73 20  tion for Rust's 
4190: 75 6e 77 69 6e 64 65 72 2e 0a 23 6c 6c 76 6d 2d  unwinder..#llvm-
41a0: 6c 69 62 75 6e 77 69 6e 64 20 3d 20 66 61 6c 73  libunwind = fals
41b0: 65 0a 0a 23 20 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  e..# ===========
41c0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
41d0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
41e0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
41f0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
4200: 3d 3d 0a 23 20 4f 70 74 69 6f 6e 73 20 66 6f 72  ==.# Options for
4210: 20 73 70 65 63 69 66 69 63 20 74 61 72 67 65 74   specific target
4220: 73 0a 23 0a 23 20 45 61 63 68 20 6f 66 20 74 68  s.#.# Each of th
4230: 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6f 70 74 69  e following opti
4240: 6f 6e 73 20 69 73 20 73 63 6f 70 65 64 20 74 6f  ons is scoped to
4250: 20 74 68 65 20 73 70 65 63 69 66 69 63 20 74 61   the specific ta
4260: 72 67 65 74 20 74 72 69 70 6c 65 20 69 6e 0a 23  rget triple in.#
4270: 20 71 75 65 73 74 69 6f 6e 20 61 6e 64 20 69 73   question and is
4280: 20 75 73 65 64 20 66 6f 72 20 64 65 74 65 72 6d   used for determ
4290: 69 6e 69 6e 67 20 68 6f 77 20 74 6f 20 63 6f 6d  ining how to com
42a0: 70 69 6c 65 20 65 61 63 68 20 74 61 72 67 65 74  pile each target
42b0: 2e 0a 23 20 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ..# ============
42c0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
42d0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
42e0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
42f0: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
4300: 3d 0a 5b 74 61 72 67 65 74 2e 78 38 36 5f 36 34  =.[target.x86_64
4310: 2d 75 6e 6b 6e 6f 77 6e 2d 6c 69 6e 75 78 2d 67  -unknown-linux-g
4320: 6e 75 5d 0a 0a 23 20 43 20 63 6f 6d 70 69 6c 65  nu]..# C compile
4330: 72 20 74 6f 20 62 65 20 75 73 65 64 20 74 6f 20  r to be used to 
4340: 63 6f 6d 70 69 6c 65 72 20 43 20 63 6f 64 65 2e  compiler C code.
4350: 20 4e 6f 74 65 20 74 68 61 74 20 74 68 65 0a 23   Note that the.#
4360: 20 64 65 66 61 75 6c 74 20 76 61 6c 75 65 20 69   default value i
4370: 73 20 70 6c 61 74 66 6f 72 6d 20 73 70 65 63 69  s platform speci
4380: 66 69 63 2c 20 61 6e 64 20 69 66 20 6e 6f 74 20  fic, and if not 
4390: 73 70 65 63 69 66 69 65 64 20 69 74 20 6d 61 79  specified it may
43a0: 20 61 6c 73 6f 20 64 65 70 65 6e 64 20 6f 6e 0a   also depend on.
43b0: 23 20 77 68 61 74 20 70 6c 61 74 66 6f 72 6d 20  # what platform 
43c0: 69 73 20 63 72 6f 73 73 69 6e 67 20 74 6f 20 77  is crossing to w
43d0: 68 61 74 20 70 6c 61 74 66 6f 72 6d 2e 0a 23 63  hat platform..#c
43e0: 63 20 3d 20 22 63 63 22 0a 0a 23 20 43 2b 2b 20  c = "cc"..# C++ 
43f0: 63 6f 6d 70 69 6c 65 72 20 74 6f 20 62 65 20 75  compiler to be u
4400: 73 65 64 20 74 6f 20 63 6f 6d 70 69 6c 65 72 20  sed to compiler 
4410: 43 2b 2b 20 63 6f 64 65 20 28 65 2e 67 2e 20 4c  C++ code (e.g. L
4420: 4c 56 4d 20 61 6e 64 20 6f 75 72 20 4c 4c 56 4d  LVM and our LLVM
4430: 20 73 68 69 6d 73 29 2e 0a 23 20 54 68 69 73 20   shims)..# This 
4440: 69 73 20 6f 6e 6c 79 20 75 73 65 64 20 66 6f 72  is only used for
4450: 20 68 6f 73 74 20 74 61 72 67 65 74 73 2e 0a 23   host targets..#
4460: 63 78 78 20 3d 20 22 63 2b 2b 22 0a 0a 23 20 41  cxx = "c++"..# A
4470: 72 63 68 69 76 65 72 20 74 6f 20 62 65 20 75 73  rchiver to be us
4480: 65 64 20 74 6f 20 61 73 73 65 6d 62 6c 65 20 73  ed to assemble s
4490: 74 61 74 69 63 20 6c 69 62 72 61 72 69 65 73 20  tatic libraries 
44a0: 63 6f 6d 70 69 6c 65 64 20 66 72 6f 6d 20 43 2f  compiled from C/
44b0: 43 2b 2b 20 63 6f 64 65 2e 0a 23 20 4e 6f 74 65  C++ code..# Note
44c0: 3a 20 61 6e 20 61 62 73 6f 6c 75 74 65 20 70 61  : an absolute pa
44d0: 74 68 20 73 68 6f 75 6c 64 20 62 65 20 75 73 65  th should be use
44e0: 64 2c 20 6f 74 68 65 72 77 69 73 65 20 4c 4c 56  d, otherwise LLV
44f0: 4d 20 62 75 69 6c 64 20 77 69 6c 6c 20 62 72 65  M build will bre
4500: 61 6b 2e 0a 23 61 72 20 3d 20 22 61 72 22 0a 0a  ak..#ar = "ar"..
4510: 23 20 52 61 6e 6c 69 62 20 74 6f 20 62 65 20 75  # Ranlib to be u
4520: 73 65 64 20 74 6f 20 61 73 73 65 6d 62 6c 65 20  sed to assemble 
4530: 73 74 61 74 69 63 20 6c 69 62 72 61 72 69 65 73  static libraries
4540: 20 63 6f 6d 70 69 6c 65 64 20 66 72 6f 6d 20 43   compiled from C
4550: 2f 43 2b 2b 20 63 6f 64 65 2e 0a 23 20 4e 6f 74  /C++ code..# Not
4560: 65 3a 20 61 6e 20 61 62 73 6f 6c 75 74 65 20 70  e: an absolute p
4570: 61 74 68 20 73 68 6f 75 6c 64 20 62 65 20 75 73  ath should be us
4580: 65 64 2c 20 6f 74 68 65 72 77 69 73 65 20 4c 4c  ed, otherwise LL
4590: 56 4d 20 62 75 69 6c 64 20 77 69 6c 6c 20 62 72  VM build will br
45a0: 65 61 6b 2e 0a 23 72 61 6e 6c 69 62 20 3d 20 22  eak..#ranlib = "
45b0: 72 61 6e 6c 69 62 22 0a 0a 23 20 4c 69 6e 6b 65  ranlib"..# Linke
45c0: 72 20 74 6f 20 62 65 20 75 73 65 64 20 74 6f 20  r to be used to 
45d0: 6c 69 6e 6b 20 52 75 73 74 20 63 6f 64 65 2e 20  link Rust code. 
45e0: 4e 6f 74 65 20 74 68 61 74 20 74 68 65 0a 23 20  Note that the.# 
45f0: 64 65 66 61 75 6c 74 20 76 61 6c 75 65 20 69 73  default value is
4600: 20 70 6c 61 74 66 6f 72 6d 20 73 70 65 63 69 66   platform specif
4610: 69 63 2c 20 61 6e 64 20 69 66 20 6e 6f 74 20 73  ic, and if not s
4620: 70 65 63 69 66 69 65 64 20 69 74 20 6d 61 79 20  pecified it may 
4630: 61 6c 73 6f 20 64 65 70 65 6e 64 20 6f 6e 0a 23  also depend on.#
4640: 20 77 68 61 74 20 70 6c 61 74 66 6f 72 6d 20 69   what platform i
4650: 73 20 63 72 6f 73 73 69 6e 67 20 74 6f 20 77 68  s crossing to wh
4660: 61 74 20 70 6c 61 74 66 6f 72 6d 2e 0a 23 6c 69  at platform..#li
4670: 6e 6b 65 72 20 3d 20 22 63 63 22 0a 0a 23 20 50  nker = "cc"..# P
4680: 61 74 68 20 74 6f 20 74 68 65 20 60 6c 6c 76 6d  ath to the `llvm
4690: 2d 63 6f 6e 66 69 67 60 20 62 69 6e 61 72 79 20  -config` binary 
46a0: 6f 66 20 74 68 65 20 69 6e 73 74 61 6c 6c 61 74  of the installat
46b0: 69 6f 6e 20 6f 66 20 61 20 63 75 73 74 6f 6d 20  ion of a custom 
46c0: 4c 4c 56 4d 20 74 6f 20 6c 69 6e 6b 0a 23 20 61  LLVM to link.# a
46d0: 67 61 69 6e 73 74 2e 20 4e 6f 74 65 20 74 68 61  gainst. Note tha
46e0: 74 20 69 66 20 74 68 69 73 20 69 73 20 73 70 65  t if this is spe
46f0: 63 69 66 69 65 64 20 77 65 20 64 6f 6e 27 74 20  cified we don't 
4700: 63 6f 6d 70 69 6c 65 20 4c 4c 56 4d 20 61 74 20  compile LLVM at 
4710: 61 6c 6c 20 66 6f 72 20 74 68 69 73 0a 23 20 74  all for this.# t
4720: 61 72 67 65 74 2e 0a 23 6c 6c 76 6d 2d 63 6f 6e  arget..#llvm-con
4730: 66 69 67 20 3d 20 22 2e 2e 2f 70 61 74 68 2f 74  fig = "../path/t
4740: 6f 2f 6c 6c 76 6d 2f 72 6f 6f 74 2f 62 69 6e 2f  o/llvm/root/bin/
4750: 6c 6c 76 6d 2d 63 6f 6e 66 69 67 22 0a 0a 23 20  llvm-config"..# 
4760: 4e 6f 72 6d 61 6c 6c 79 20 74 68 65 20 62 75 69  Normally the bui
4770: 6c 64 20 73 79 73 74 65 6d 20 63 61 6e 20 66 69  ld system can fi
4780: 6e 64 20 4c 4c 56 4d 27 73 20 46 69 6c 65 43 68  nd LLVM's FileCh
4790: 65 63 6b 20 75 74 69 6c 69 74 79 2c 20 62 75 74  eck utility, but
47a0: 20 69 66 0a 23 20 6e 6f 74 2c 20 79 6f 75 20 63   if.# not, you c
47b0: 61 6e 20 73 70 65 63 69 66 79 20 61 6e 20 65 78  an specify an ex
47c0: 70 6c 69 63 69 74 20 66 69 6c 65 20 6e 61 6d 65  plicit file name
47d0: 20 66 6f 72 20 69 74 2e 0a 23 6c 6c 76 6d 2d 66   for it..#llvm-f
47e0: 69 6c 65 63 68 65 63 6b 20 3d 20 22 2f 70 61 74  ilecheck = "/pat
47f0: 68 2f 74 6f 2f 46 69 6c 65 43 68 65 63 6b 22 0a  h/to/FileCheck".
4800: 0a 23 20 49 66 20 74 68 69 73 20 74 61 72 67 65  .# If this targe
4810: 74 20 69 73 20 66 6f 72 20 41 6e 64 72 6f 69 64  t is for Android
4820: 2c 20 74 68 69 73 20 6f 70 74 69 6f 6e 20 77 69  , this option wi
4830: 6c 6c 20 62 65 20 72 65 71 75 69 72 65 64 20 74  ll be required t
4840: 6f 20 73 70 65 63 69 66 79 20 77 68 65 72 65 0a  o specify where.
4850: 23 20 74 68 65 20 4e 44 4b 20 66 6f 72 20 74 68  # the NDK for th
4860: 65 20 74 61 72 67 65 74 20 6c 69 76 65 73 2e 20  e target lives. 
4870: 54 68 69 73 20 69 73 20 75 73 65 64 20 74 6f 20  This is used to 
4880: 66 69 6e 64 20 74 68 65 20 43 20 63 6f 6d 70 69  find the C compi
4890: 6c 65 72 20 74 6f 20 6c 69 6e 6b 20 61 6e 64 0a  ler to link and.
48a0: 23 20 62 75 69 6c 64 20 6e 61 74 69 76 65 20 63  # build native c
48b0: 6f 64 65 2e 0a 23 61 6e 64 72 6f 69 64 2d 6e 64  ode..#android-nd
48c0: 6b 20 3d 20 22 2f 70 61 74 68 2f 74 6f 2f 6e 64  k = "/path/to/nd
48d0: 6b 22 0a 0a 23 20 46 6f 72 63 65 20 73 74 61 74  k"..# Force stat
48e0: 69 63 20 6f 72 20 64 79 6e 61 6d 69 63 20 6c 69  ic or dynamic li
48f0: 6e 6b 61 67 65 20 6f 66 20 74 68 65 20 73 74 61  nkage of the sta
4900: 6e 64 61 72 64 20 6c 69 62 72 61 72 79 20 66 6f  ndard library fo
4910: 72 20 74 68 69 73 20 74 61 72 67 65 74 2e 20 49  r this target. I
4920: 66 0a 23 20 74 68 69 73 20 74 61 72 67 65 74 20  f.# this target 
4930: 69 73 20 61 20 68 6f 73 74 20 66 6f 72 20 72 75  is a host for ru
4940: 73 74 63 2c 20 74 68 69 73 20 77 69 6c 6c 20 61  stc, this will a
4950: 6c 73 6f 20 61 66 66 65 63 74 20 74 68 65 20 6c  lso affect the l
4960: 69 6e 6b 61 67 65 20 6f 66 20 74 68 65 0a 23 20  inkage of the.# 
4970: 63 6f 6d 70 69 6c 65 72 20 69 74 73 65 6c 66 2e  compiler itself.
4980: 20 54 68 69 73 20 69 73 20 75 73 65 66 75 6c 20   This is useful 
4990: 66 6f 72 20 62 75 69 6c 64 69 6e 67 20 72 75 73  for building rus
49a0: 74 63 20 6f 6e 20 74 61 72 67 65 74 73 20 74 68  tc on targets th
49b0: 61 74 20 6e 6f 72 6d 61 6c 6c 79 0a 23 20 6f 6e  at normally.# on
49c0: 6c 79 20 75 73 65 20 73 74 61 74 69 63 20 6c 69  ly use static li
49d0: 62 72 61 72 69 65 73 2e 20 49 66 20 75 6e 73 65  braries. If unse
49e0: 74 2c 20 74 68 65 20 74 61 72 67 65 74 27 73 20  t, the target's 
49f0: 64 65 66 61 75 6c 74 20 6c 69 6e 6b 61 67 65 20  default linkage 
4a00: 69 73 20 75 73 65 64 2e 0a 23 63 72 74 2d 73 74  is used..#crt-st
4a10: 61 74 69 63 20 3d 20 66 61 6c 73 65 0a 0a 23 20  atic = false..# 
4a20: 54 68 65 20 72 6f 6f 74 20 6c 6f 63 61 74 69 6f  The root locatio
4a30: 6e 20 6f 66 20 74 68 65 20 4d 55 53 4c 20 69 6e  n of the MUSL in
4a40: 73 74 61 6c 6c 61 74 69 6f 6e 20 64 69 72 65 63  stallation direc
4a50: 74 6f 72 79 2e 20 54 68 65 20 6c 69 62 72 61 72  tory. The librar
4a60: 79 20 64 69 72 65 63 74 6f 72 79 0a 23 20 77 69  y directory.# wi
4a70: 6c 6c 20 61 6c 73 6f 20 6e 65 65 64 20 74 6f 20  ll also need to 
4a80: 63 6f 6e 74 61 69 6e 20 6c 69 62 75 6e 77 69 6e  contain libunwin
4a90: 64 2e 61 20 66 6f 72 20 61 6e 20 75 6e 77 69 6e  d.a for an unwin
4aa0: 64 69 6e 67 20 69 6d 70 6c 65 6d 65 6e 74 61 74  ding implementat
4ab0: 69 6f 6e 2e 20 4e 6f 74 65 0a 23 20 74 68 61 74  ion. Note.# that
4ac0: 20 74 68 69 73 20 6f 70 74 69 6f 6e 20 6f 6e 6c   this option onl
4ad0: 79 20 6d 61 6b 65 73 20 73 65 6e 73 65 20 66 6f  y makes sense fo
4ae0: 72 20 4d 55 53 4c 20 74 61 72 67 65 74 73 20 74  r MUSL targets t
4af0: 68 61 74 20 70 72 6f 64 75 63 65 20 73 74 61 74  hat produce stat
4b00: 69 63 61 6c 6c 79 0a 23 20 6c 69 6e 6b 65 64 20  ically.# linked 
4b10: 62 69 6e 61 72 69 65 73 0a 23 6d 75 73 6c 2d 72  binaries.#musl-r
4b20: 6f 6f 74 20 3d 20 22 2e 2e 2e 22 0a 0a 23 20 54  oot = "..."..# T
4b30: 68 65 20 72 6f 6f 74 20 6c 6f 63 61 74 69 6f 6e  he root location
4b40: 20 6f 66 20 74 68 65 20 60 77 61 73 6d 33 32 2d   of the `wasm32-
4b50: 77 61 73 69 60 20 73 79 73 72 6f 6f 74 2e 0a 23  wasi` sysroot..#
4b60: 77 61 73 69 2d 72 6f 6f 74 20 3d 20 22 2e 2e 2e  wasi-root = "...
4b70: 22 0a 0a 23 20 55 73 65 64 20 69 6e 20 74 65 73  "..# Used in tes
4b80: 74 69 6e 67 20 66 6f 72 20 63 6f 6e 66 69 67 75  ting for configu
4b90: 72 69 6e 67 20 77 68 65 72 65 20 74 68 65 20 51  ring where the Q
4ba0: 45 4d 55 20 69 6d 61 67 65 73 20 61 72 65 20 6c  EMU images are l
4bb0: 6f 63 61 74 65 64 2c 20 79 6f 75 0a 23 20 70 72  ocated, you.# pr
4bc0: 6f 62 61 62 6c 79 20 64 6f 6e 27 74 20 77 61 6e  obably don't wan
4bd0: 74 20 74 6f 20 75 73 65 20 74 68 69 73 2e 0a 23  t to use this..#
4be0: 71 65 6d 75 2d 72 6f 6f 74 66 73 20 3d 20 22 2e  qemu-rootfs = ".
4bf0: 2e 2e 22 0a 0a 23 20 3d 3d 3d 3d 3d 3d 3d 3d 3d  .."..# =========
4c00: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
4c10: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
4c20: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
4c30: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
4c40: 3d 3d 3d 3d 0a 23 20 44 69 73 74 72 69 62 75 74  ====.# Distribut
4c50: 69 6f 6e 20 6f 70 74 69 6f 6e 73 0a 23 0a 23 20  ion options.#.# 
4c60: 54 68 65 73 65 20 6f 70 74 69 6f 6e 73 20 61 72  These options ar
4c70: 65 20 72 65 6c 61 74 65 64 20 74 6f 20 64 69 73  e related to dis
4c80: 74 72 69 62 75 74 69 6f 6e 2c 20 6d 6f 73 74 6c  tribution, mostl
4c90: 79 20 66 6f 72 20 74 68 65 20 52 75 73 74 20 70  y for the Rust p
4ca0: 72 6f 6a 65 63 74 20 69 74 73 65 6c 66 2e 0a 23  roject itself..#
4cb0: 20 59 6f 75 20 70 72 6f 62 61 62 6c 79 20 77 6f   You probably wo
4cc0: 6e 27 74 20 6e 65 65 64 20 74 6f 20 63 6f 6e 63  n't need to conc
4cd0: 65 72 6e 20 79 6f 75 72 73 65 6c 66 20 77 69 74  ern yourself wit
4ce0: 68 20 61 6e 79 20 6f 66 20 74 68 65 73 65 20 6f  h any of these o
4cf0: 70 74 69 6f 6e 73 0a 23 20 3d 3d 3d 3d 3d 3d 3d  ptions.# =======
4d00: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
4d10: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
4d20: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
4d30: 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d  ================
4d40: 3d 3d 3d 3d 3d 3d 0a 5b 64 69 73 74 5d 0a 0a 23  ======.[dist]..#
4d50: 20 54 68 69 73 20 69 73 20 74 68 65 20 66 6f 6c   This is the fol
4d60: 64 65 72 20 6f 66 20 61 72 74 69 66 61 63 74 73  der of artifacts
4d70: 20 74 68 61 74 20 74 68 65 20 62 75 69 6c 64 20   that the build 
4d80: 73 79 73 74 65 6d 20 77 69 6c 6c 20 73 69 67 6e  system will sign
4d90: 2e 20 41 6c 6c 20 66 69 6c 65 73 20 69 6e 0a 23  . All files in.#
4da0: 20 74 68 69 73 20 64 69 72 65 63 74 6f 72 79 20   this directory 
4db0: 77 69 6c 6c 20 62 65 20 73 69 67 6e 65 64 20 77  will be signed w
4dc0: 69 74 68 20 74 68 65 20 64 65 66 61 75 6c 74 20  ith the default 
4dd0: 67 70 67 20 6b 65 79 20 75 73 69 6e 67 20 74 68  gpg key using th
4de0: 65 20 73 79 73 74 65 6d 20 60 67 70 67 60 0a 23  e system `gpg`.#
4df0: 20 62 69 6e 61 72 79 2e 20 54 68 65 20 60 61 73   binary. The `as
4e00: 63 60 20 61 6e 64 20 60 73 68 61 32 35 36 60 20  c` and `sha256` 
4e10: 66 69 6c 65 73 20 77 69 6c 6c 20 61 6c 6c 20 62  files will all b
4e20: 65 20 6f 75 74 70 75 74 20 69 6e 74 6f 20 74 68  e output into th
4e30: 65 20 73 74 61 6e 64 61 72 64 20 64 69 73 74 0a  e standard dist.
4e40: 23 20 6f 75 74 70 75 74 20 66 6f 6c 64 65 72 20  # output folder 
4e50: 28 63 75 72 72 65 6e 74 6c 79 20 60 62 75 69 6c  (currently `buil
4e60: 64 2f 64 69 73 74 60 29 0a 23 0a 23 20 54 68 69  d/dist`).#.# Thi
4e70: 73 20 66 6f 6c 64 65 72 20 73 68 6f 75 6c 64 20  s folder should 
4e80: 62 65 20 70 6f 70 75 6c 61 74 65 64 20 61 68 65  be populated ahe
4e90: 61 64 20 6f 66 20 74 69 6d 65 20 62 65 66 6f 72  ad of time befor
4ea0: 65 20 74 68 65 20 62 75 69 6c 64 20 73 79 73 74  e the build syst
4eb0: 65 6d 20 69 73 0a 23 20 69 6e 76 6f 6b 65 64 2e  em is.# invoked.
4ec0: 0a 23 73 69 67 6e 2d 66 6f 6c 64 65 72 20 3d 20  .#sign-folder = 
4ed0: 22 70 61 74 68 2f 74 6f 2f 66 6f 6c 64 65 72 2f  "path/to/folder/
4ee0: 74 6f 2f 73 69 67 6e 22 0a 0a 23 20 54 68 69 73  to/sign"..# This
4ef0: 20 69 73 20 61 20 66 69 6c 65 20 77 68 69 63 68   is a file which
4f00: 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 70 61   contains the pa
4f10: 73 73 77 6f 72 64 20 6f 66 20 74 68 65 20 64 65  ssword of the de
4f20: 66 61 75 6c 74 20 67 70 67 20 6b 65 79 2e 20 54  fault gpg key. T
4f30: 68 69 73 20 77 69 6c 6c 0a 23 20 62 65 20 70 61  his will.# be pa
4f40: 73 73 65 64 20 74 6f 20 60 67 70 67 60 20 64 6f  ssed to `gpg` do
4f50: 77 6e 20 74 68 65 20 72 6f 61 64 20 77 68 65 6e  wn the road when
4f60: 20 73 69 67 6e 69 6e 67 20 61 6c 6c 20 66 69 6c   signing all fil
4f70: 65 73 20 69 6e 20 60 73 69 67 6e 2d 66 6f 6c 64  es in `sign-fold
4f80: 65 72 60 0a 23 20 61 62 6f 76 65 2e 20 54 68 69  er`.# above. Thi
4f90: 73 20 73 68 6f 75 6c 64 20 62 65 20 73 74 6f 72  s should be stor
4fa0: 65 64 20 69 6e 20 70 6c 61 69 6e 74 65 78 74 2e  ed in plaintext.
4fb0: 0a 23 67 70 67 2d 70 61 73 73 77 6f 72 64 2d 66  .#gpg-password-f
4fc0: 69 6c 65 20 3d 20 22 70 61 74 68 2f 74 6f 2f 67  ile = "path/to/g
4fd0: 70 67 2f 70 61 73 73 77 6f 72 64 22 0a 0a 23 20  pg/password"..# 
4fe0: 54 68 65 20 72 65 6d 6f 74 65 20 61 64 64 72 65  The remote addre
4ff0: 73 73 20 74 68 61 74 20 61 6c 6c 20 61 72 74 69  ss that all arti
5000: 66 61 63 74 73 20 77 69 6c 6c 20 65 76 65 6e 74  facts will event
5010: 75 61 6c 6c 79 20 62 65 20 75 70 6c 6f 61 64 65  ually be uploade
5020: 64 20 74 6f 2e 20 54 68 65 0a 23 20 62 75 69 6c  d to. The.# buil
5030: 64 20 73 79 73 74 65 6d 20 67 65 6e 65 72 61 74  d system generat
5040: 65 73 20 6d 61 6e 69 66 65 73 74 73 20 77 68 69  es manifests whi
5050: 63 68 20 77 69 6c 6c 20 70 6f 69 6e 74 20 74 6f  ch will point to
5060: 20 74 68 65 73 65 20 75 72 6c 73 2c 20 61 6e 64   these urls, and
5070: 20 66 6f 72 20 74 68 65 0a 23 20 6d 61 6e 69 66   for the.# manif
5080: 65 73 74 73 20 74 6f 20 62 65 20 63 6f 72 72 65  ests to be corre
5090: 63 74 20 74 68 65 79 27 6c 6c 20 68 61 76 65 20  ct they'll have 
50a0: 74 6f 20 68 61 76 65 20 74 68 65 20 72 69 67 68  to have the righ
50b0: 74 20 55 52 4c 73 20 65 6e 63 6f 64 65 64 2e 0a  t URLs encoded..
50c0: 23 0a 23 20 4e 6f 74 65 20 74 68 61 74 20 74 68  #.# Note that th
50d0: 69 73 20 61 64 64 72 65 73 73 20 73 68 6f 75 6c  is address shoul
50e0: 64 20 6e 6f 74 20 63 6f 6e 74 61 69 6e 20 61 20  d not contain a 
50f0: 74 72 61 69 6c 69 6e 67 20 73 6c 61 73 68 20 61  trailing slash a
5100: 73 20 66 69 6c 65 20 6e 61 6d 65 73 20 77 69 6c  s file names wil
5110: 6c 0a 23 20 62 65 20 61 70 70 65 6e 64 65 64 20  l.# be appended 
5120: 74 6f 20 69 74 2e 0a 23 75 70 6c 6f 61 64 2d 61  to it..#upload-a
5130: 64 64 72 20 3d 20 22 68 74 74 70 73 3a 2f 2f 65  ddr = "https://e
5140: 78 61 6d 70 6c 65 2e 63 6f 6d 2f 66 6f 6c 64 65  xample.com/folde
5150: 72 22 0a 0a 23 20 57 68 65 74 68 65 72 20 74 6f  r"..# Whether to
5160: 20 62 75 69 6c 64 20 61 20 70 6c 61 69 6e 20 73   build a plain s
5170: 6f 75 72 63 65 20 74 61 72 62 61 6c 6c 20 74 6f  ource tarball to
5180: 20 75 70 6c 6f 61 64 0a 23 20 57 65 20 64 69 73   upload.# We dis
5190: 61 62 6c 65 20 74 68 61 74 20 6f 6e 20 57 69 6e  able that on Win
51a0: 64 6f 77 73 20 6e 6f 74 20 74 6f 20 6f 76 65 72  dows not to over
51b0: 72 69 64 65 20 74 68 65 20 6f 6e 65 20 61 6c 72  ride the one alr
51c0: 65 61 64 79 20 75 70 6c 6f 61 64 65 64 20 6f 6e  eady uploaded on
51d0: 20 53 33 0a 23 20 61 73 20 74 68 65 20 6f 6e 65   S3.# as the one
51e0: 20 62 75 69 6c 74 20 6f 6e 20 57 69 6e 64 6f 77   built on Window
51f0: 73 20 77 69 6c 6c 20 63 6f 6e 74 61 69 6e 20 62  s will contain b
5200: 61 63 6b 73 6c 61 73 68 65 73 20 69 6e 20 70 61  ackslashes in pa
5210: 74 68 73 20 63 61 75 73 69 6e 67 20 70 72 6f 62  ths causing prob
5220: 6c 65 6d 73 0a 23 20 6f 6e 20 6c 69 6e 75 78 0a  lems.# on linux.
5230: 23 73 72 63 2d 74 61 72 62 61 6c 6c 20 3d 20 74  #src-tarball = t
5240: 72 75 65 0a 23 0a 0a 23 20 57 68 65 74 68 65 72  rue.#..# Whether
5250: 20 74 6f 20 61 6c 6c 6f 77 20 66 61 69 6c 75 72   to allow failur
5260: 65 73 20 77 68 65 6e 20 62 75 69 6c 64 69 6e 67  es when building
5270: 20 74 6f 6f 6c 73 0a 23 6d 69 73 73 69 6e 67 2d   tools.#missing-
5280: 74 6f 6f 6c 73 20 3d 20 66 61 6c 73 65 0a        tools = false.