@@ -79,7 +79,7 @@ DEST_INSTALL=$DEST/install
7979COMPONENTS=" cargo-${CARGO_BOOTSTRAP_VERSION} rust-std-${RUSTC_BOOTSTRAP_VERSION} rustc-${RUSTC_BOOTSTRAP_VERSION} "
8080
8181# set path
82- export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin
82+ export PATH=/bin:/usr/bin:/usr/local/bin
8383
8484# we need these to avoid patching the sources for sha256sum
8585export PATH=$PATH :$BASE /../bin
@@ -147,14 +147,14 @@ fixup-vendor-patch() {
147147}
148148
149149extract () {
150- mkdir -p $DEST /tmp $DEST /bootstrap
150+ mkdir -p $DEST /tmp $DEST /bootstrap ${DEST_INSTALL}
151151
152152 download rustc-$RUST_VERSION -src.tar.gz /usr/distfiles $DEST ${RUST_DIST_SERVER} /dist || exit 1
153153 tar xvzf $DEST /rustc-$RUST_VERSION -src.tar.gz -C ${DEST} 2>&1 | wc -l
154154
155155 for component in ${COMPONENTS} ; do
156156 echo " INSTALL COMPONENT: ${component} "
157- tar xvzf ${BOOTSTRAP_DIR} /$component -${TARGET} .tar.xz -C $DEST /tmp
157+ tar xvzf ${BOOTSTRAP_DIR} /$component -${TARGET} .tar.xz -C $DEST /tmp || exit 1
158158 # install.sh needs bash, but used !/bin/bash which does not exist on DragonFly
159159 ${BASH} $DEST /tmp/$component -${TARGET} /install.sh --prefix=$DEST /bootstrap
160160 done
@@ -170,6 +170,18 @@ prepatch() {
170170 fi
171171}
172172
173+ create-config () {
174+ cat $BASE /config.toml.template | \
175+ sed -e " s:%%CARGO%%:${BOOTSTRAP_COMPILER_BASE} /bin/cargo:g" | \
176+ sed -e " s:%%RUSTC%%:${BOOTSTRAP_COMPILER_BASE} /bin/rustc:g" | \
177+ sed -e " s:%%PREFIX%%:${DEST_INSTALL} :g" | \
178+ sed -e " s:%%CC%%:${CONF_CC} :g" | \
179+ sed -e " s:%%CXX%%:${CONF_CXX} :g" | \
180+ sed -e " s:%%LINKER%%:${CONF_LINKER} :g" | \
181+ sed -e " s:%%LLVM_CONFIG%%:${LLVM_ROOT} /bin/llvm-config:g" > \
182+ $DEST /rustc-$RUST_VERSION -src/config.toml
183+ }
184+
173185config () {
174186 cd $DEST /rustc-$RUST_VERSION -src
175187 ./configure \
@@ -200,6 +212,18 @@ inst() {
200212 mk install
201213}
202214
215+ xbuild () {
216+ cd $DEST /rustc-$RUST_VERSION -src && python x.py build --verbose --config ./config.toml --jobs 10
217+ }
218+
219+ xdist () {
220+ cd $DEST /rustc-$RUST_VERSION -src && python x.py dist --verbose --config ./config.toml
221+ }
222+
223+ xinst () {
224+ cd $DEST /rustc-$RUST_VERSION -src && python x.py install --verbose --config ./config.toml
225+ }
226+
203227info () {
204228 echo Base: $BASE
205229 echo Release-Channel: $RELEASE_CHANNEL
0 commit comments