File tree 1 file changed +12
-4
lines changed
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 557
557
558
558
if [ ! -z " $CFG_ENABLE_LOCAL_RUST " ]
559
559
then
560
- if [ ! -f ${CFG_LOCAL_RUST_ROOT} /bin/rustc${BIN_SUF} ]
560
+ system_rustc=$( which rustc)
561
+ if [ -f ${CFG_LOCAL_RUST_ROOT} /bin/rustc${BIN_SUF} ]
561
562
then
562
- err " no local rust to use"
563
+ : # everything already configured
564
+ elif [ -n " $system_rustc " ]
565
+ then
566
+ # we assume that rustc is in a /bin directory
567
+ CFG_LOCAL_RUST_ROOT=${system_rustc%/ bin/ rustc}
563
568
else
564
- LRV=` ${CFG_LOCAL_RUST_ROOT} /bin/rustc${BIN_SUF} --version`
565
- step_msg " using rustc at: ${CFG_LOCAL_RUST_ROOT} with version: $LRV "
569
+ err " no local rust to use"
566
570
fi
571
+
572
+ LRV=` ${CFG_LOCAL_RUST_ROOT} /bin/rustc${BIN_SUF} --version`
573
+ step_msg " using rustc at: ${CFG_LOCAL_RUST_ROOT} with version: $LRV "
574
+ putvar CFG_LOCAL_RUST_ROOT
567
575
fi
568
576
569
577
# Force freebsd to build with clang; gcc doesn't like us there
You can’t perform that action at this time.
0 commit comments