RFR: 8296904: Improve handling of macos xcode toolchain [v3]

Magnus Ihse Bursie ihse at openjdk.org
Wed Nov 16 19:55:04 UTC 2022


On Tue, 15 Nov 2022 21:45:25 GMT, Christoph Langer <clanger at openjdk.org> wrote:

>> With this PR I'd like to make it easier to use dedicated installations of Xcode on Mac OS for OpenJDK builds without having to switch the active Xcode globally via `xcode-select`.
>> 
>> I propose adding a new configure flag `--with-xcode-path` that takes the path to an Xcode installation. If the option is set, this path is expanded to a valid `TOOLCHAIN_PATH`.
>> 
>> Furthermore, I fix detection of xcodebuild and correctly setting the sysroot from the toolchain by moving `AC_SUBST(TOOLCHAIN_PATH)` before calling `BASIC_SETUP_XCODE_SYSROOT` and honoring `TOOLCHAIN_PATH` in BASIC_SETUP_XCODE_SYSROOT in the case when no devkit is specified. As I see it, this is a viable fix, even if not introducing `--with-xcode-path`.
>
> Christoph Langer has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
> 
>  - Review suggestion
>  - Merge branch 'master' into xcode-toolchain
>  - Improve options for xcode toolchain

Looks good, thanks for fixing this!

Is there perhaps some documentation in doc/building.md that needs updating? I know there is a bit written about Xcode, I can imagine some pointers to this new argument would fit in there.

-------------

Marked as reviewed by ihse (Reviewer).

PR: https://git.openjdk.org/jdk/pull/11113



More information about the build-dev mailing list