Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8344030

UTIL_LOOKUP_TOOLCHAIN_PROGS should start by looking in TOOLCHAIN_PATH

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • infrastructure
    • None

      This bug report was triggered by the discussion in https://github.com/openjdk/jdk/pull/21999.

      In TOOLCHAIN_PRE_DETECTION, we prepend $TOOLCHAIN_PATH to the actual PATH, and then restore this in TOOLCHAIN_POST_DETECTION. This is likely a remnant of older times, before we started using our own UTIL_LOOKUP* functions.

      Instead, we should update UTIL_LOOKUP_TOOLCHAIN_PROGS to use $TOOLCHAIN_PATH:$PATH as 3rd variable to UTIL_LOOKUP_PROGS (if it is not given).

      The risk we need to be aware of is if some tool we're running assume that the TOOLCHAIN_PATH is properly included on the PATH, e.g. because it tries to execute a helper command in turn. This could specifically be a problem for Visual Studio, and we need to double-check that removing TOOLCHAIN_PATH from the PATH does not break anything. (In fact, I believe we already append TOOLCHAIN_PATH to the PATH specifically for Windows already, so this could very well be done twice...)

      With these changes in place, the hack introduced by JDK-8343883 can be changed to a simple call to UTIL_LOOKUP_TOOLCHAIN_PROGS.

            Unassigned Unassigned
            ihse Magnus Ihse Bursie
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: