[clang] [Darwin][Driver][clang] Prioritise command line args over `DEFAULT_SYSROOT` (PR #115993)

Cyndy Ishida via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 6 09:31:43 PST 2024


cyndyishida wrote:

> Current patch breaks test:
> 
> ```
> // We pass --sysroot="" to defeat any -DDEFAULT_SYSROOT parameter.
> ```
> 
> I think that just a pure hack in the test case, we can just update the test. @cyndyishida what do you think about the current approach?

SGTM too. I don't see wide usage of it on my end. It looks like that part of test itself was added to workaround a toolchain build configuration issue, where `DEFAULT_SYSROOT` is actually used. I think fixing the test to adapt to the changes in the PR is the right move.  More details of that in: https://github.com/llvm/llvm-project/issues/94284 

Changing the test itself (to e.g. locally set that env var) is a good regression test that should be added for this pr anyway. 

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


More information about the cfe-commits mailing list