RFR: Fallback xctrace profiler resolution on SDKROOT env variable
Filipp Zhinkin
fzhinkin at openjdk.org
Tue Apr 1 19:35:28 UTC 2025
On Tue, 1 Apr 2025 08:06:18 GMT, Galder Zamarreño <galder at openjdk.org> wrote:
> If `xctrace` cannot be found via `xcode-select` it checks the SDKROOT environment variable.
>
> @fzhinkin Can you have a look?
@galderz, I'm not an expert in Xcode-related topics, but it seems like `SDKROOT` is meant to point to a directory containing headers and libraries for a particular platform (so it should be synonymous to `xcrun --show-sdk-path`, which returns `/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk` for me), rather than a root directory with tools like `xctrace`.
Could you please elaborate scenarios where `xctrace-select` can't locate `xctrace`, but `SDKROOT` points to a proper directory? There's also a [DEVELOPER_DIR](https://keith.github.io/xcode-man-pages/xcode-select.1.html#ENVIRONMENT) env variable, which allows temporary overriding the directory used by `xcode-select`. Perhaps, it'll be better to rely on its value to locate `xctrace`?
-------------
PR Comment: https://git.openjdk.org/jmh/pull/155#issuecomment-2770490934
More information about the jmh-dev
mailing list