Skip to content

8344030: Improved handling of TOOLCHAIN_PATH #24525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

magicus
Copy link
Member

@magicus magicus commented Apr 8, 2025

This bug report was triggered by the discussion in #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.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8344030: Improved handling of TOOLCHAIN_PATH (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24525/head:pull/24525
$ git checkout pull/24525

Update a local copy of the PR:
$ git checkout pull/24525
$ git pull https://git.openjdk.org/jdk.git pull/24525/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 24525

View PR using the GUI difftool:
$ git pr show -t 24525

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24525.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 8, 2025

👋 Welcome back ihse! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Apr 8, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk
Copy link

openjdk bot commented Apr 8, 2025

@magicus The following label will be automatically applied to this pull request:

  • build

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the build build-dev@openjdk.org label Apr 8, 2025
@bridgekeeper
Copy link

bridgekeeper bot commented Jun 3, 2025

@magicus This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

1 participant