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

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 21 02:22:45 PDT 2023


ldionne wrote:

> 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.

How do you build on Apple platforms then? Don't you need access to a SDK? I'm a bit confused about what you're doing -- do you need to use the native platform SDK when you're building Fuchsia? What SDK are you passing as `--sysroot` when testing libc++?

> 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.

I know that, but as I already explained over in https://reviews.llvm.org/D151056, making everyone's config more complicated isn't the path we want to take. We should never have been setting the sysroot, it was only a workaround for https://gitlab.kitware.com/cmake/cmake/-/issues/19180 and that should have been done another way initially.

These config files were designed to be really simple and to be easily created for custom needs. This was an answer to the incredible amount of platform-specific complexity that the previous test configuration system had, and what I'm doing right now is push back to avoid going down that path again.

Is there a reason why you don't have a `fuchsia-*.cfg.in` configuration file?

> We also need to restrict the `xcrun` change only to `apple-*.cfg.in` configurations.

No, it is needed whenever the build host is an Apple platform, which is more general than the `apple-*.cfg.in` configurations. The normal LLVM configuration also needs to run under xcrun when it is being built on macOS, cause that's how you get to the SDK.

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


More information about the libcxx-commits mailing list