jyknight wrote: This is the intended/expected behavior.
On every other platform, `-isysroot` is supposed to be an override setting the sysroot only for the header files, and _never_ overriding the linker sysroot. The `--sysroot` flag, on the other hand, sets the value used for both libraries and headers (unless the header sysroot is set via `-isysroot`). As such, there's almost never a reason to pass `-isysroot` -- the right flag is `--sysroot` 99% of the time. Except, on Darwin platforms, for some reason that's probably lost to history, the `-isysroot` is used almost universally instead of `--sysroot`, and a platform special-case was added to cause `-isysroot` to affect both the header _and_ library sysroots -- unless the `--sysroot` flag is also set. This is weird and inconsistent, but it's been that way forever. The behavior was implemented very early on in Clang's development, because the pre-existing Darwin GCC port did that. However, notably, even on Darwin, if you pass _both_ flags, you still get the intended behavior of `-isysroot` affecting headers, and `--sysroot` affecting libraries. Your change would break that. https://github.com/llvm/llvm-project/pull/115993 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits