diff options
| author | bors <bors@rust-lang.org> | 2016-07-16 01:19:16 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-16 01:19:16 -0700 |
| commit | dc8212ff200dc54113a87b3a7033879133fdfff0 (patch) | |
| tree | 05ea4ae3016c2732d32c827462705c2358f46566 /src/etc | |
| parent | c4788c26ad7dc65244a9efc50526609c4c71cfb9 (diff) | |
| parent | bbff3367fe0355dbdee466bd7d3e0ea241799a9f (diff) | |
Auto merge of #34779 - infinity0:master, r=alexcrichton
If local-rust is the same as the current version, then force a local-rebuild In Debian, we would like the option to build/rebuild the current release from *either* the current or previous stable release. So we use enable-local-rust instead of enable-local-rebuild, and read the bootstrap key dynamically from whatever is installed locally. In general, it does not make much sense to allow enable-local-rust without also setting the bootstrap key, since the build would fail otherwise. (The way I detect "the bootstrap key of [the local] rustc installation" is a bit hacky, suggestions welcome.)
Diffstat (limited to 'src/etc')
| -rwxr-xr-x | src/etc/local_stage0.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/etc/local_stage0.sh b/src/etc/local_stage0.sh index fb455441910..354be34b6a2 100755 --- a/src/etc/local_stage0.sh +++ b/src/etc/local_stage0.sh @@ -49,6 +49,13 @@ if [ -z $TARG_DIR ]; then exit 1 fi +case "$TARG_DIR" in +--print-rustc-release) + # not actually copying to TARG_DIR, just print the local rustc version and exit + ${PREFIX}/bin/rustc${BIN_SUF} --version --verbose | sed -ne 's/^release: //p' +;; +*) + cp ${PREFIX}/bin/rustc${BIN_SUF} ${TARG_DIR}/stage0/bin/ cp ${PREFIX}/${LIB_DIR}/${RUSTLIBDIR}/${TARG_DIR}/${LIB_DIR}/* ${TARG_DIR}/stage0/${LIB_DIR}/ cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}extra*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/ @@ -66,3 +73,5 @@ cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}term*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DI # do not fail if one of the above fails, as all we need is a working rustc! exit 0 + +esac |
