[libunwind] [runtimes] Remove explicit -isysroot from the testing configurations on macOS (PR #66265)

Petr Hosek via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 21 01:20:39 PDT 2023


petrhosek wrote:

> @petrhosek Please take a look -- this is passing CI and I believe this should support your use case. And it's definitely the way these configuration files should have been set up from the start, I guess I just didn't think of doing it that way when I hit the sysroot issue back in the days.

This doesn't address our use case and would in fact break our infrastructure.

We always build using an explicit sysroot that's deployed as part of the CI job (in other words, the default sysroot `/` is not usable for building binaries) and we need to pass a path to the sysroot we're using to the compiler through the `--sysroot` flag (or `-isysroot` flag on Darwin) which is what https://reviews.llvm.org/D151056 implements.

In case you're wondering "well how come you're not broken right now since https://reviews.llvm.org/D151056 hasn't landed", the answer is that we an ugly hack... err workaround which is only needed for libunwind, libc++abi and libc++ and we would like to remove it as part for [SLSA](https://slsa.dev/) adoption.

We also cannot run the compiler on Darwin through `xcrun` since `xcrun` requires selecting an active developer directory (that is running `xcode-select`) and that's not something we do on our bots; doing so would be a significant change since running `xcode-select` requires root privileges and would break our CI model.

I'd prefer landing https://reviews.llvm.org/D151056, which would fully address our use cases and I'm not aware of any downsides. Alternatively, we could create a separate test configuration that would be effectively what's in https://reviews.llvm.org/D151056. We also need to restrict the `xcrun` change only to `apple-*.cfg.in` configurations.

https://github.com/llvm/llvm-project/pull/66265


More information about the cfe-commits mailing list