Closed Bug 1176294 Opened 9 years ago Closed 9 years ago

Allow setting RUSTC from the enviroment

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox41 affected)

RESOLVED INVALID
Tracking Status
firefox41 --- affected

People

(Reporter: rillian, Assigned: rillian)

References

Details

Attachments

(1 file)

Per https://bugzilla.mozilla.org/show_bug.cgi?id=1175359#c15 many program paths can be passed to configure through the environment. Have --enable-rust check $RUSTC before a generic path.
Assignee: nobody → giles
Attachment #8624805 - Flags: review?(ted)
Comment on attachment 8624805 [details] [diff] [review]
Allow setting RUSTC from the environment

Review of attachment 8624805 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Attachment #8624805 - Flags: review?(ted) → review+
Green on try (pushlog doesn't show the commit but it's in the history as https://hg.mozilla.org/try/rev/e3ea9cdfafa4)

https://treeherder.mozilla.org/#/jobs?repo=try&revision=348479922766
Keywords: checkin-needed
Comment on attachment 8624805 [details] [diff] [review]
Allow setting RUSTC from the environment

Review of attachment 8624805 [details] [diff] [review]:
-----------------------------------------------------------------

This shouldn't be needed, because what MOZ_CHECK_PROGS(RUSTC, rustc) expands to is (skipping irrelevant stuff):

(...)
  case "$RUSTC" in
  /*)
  ac_cv_path_RUSTC="$RUSTC" # Let the user override the test with a path.
  ;;
  ?:/*)
  ac_cv_path_RUSTC="$RUSTC" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_RUSTC="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
(...)

IOW, then RUSTC is already set, its value is used.
Attachment #8624805 - Flags: review-
Interesting. This behaviour comes from AC_PATH_PROGS, and while still present in normal autoconf isn't documented.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Blocks: 1176729
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: