cachemeifyoucan wrote:

Ah, I see. I think `--sysroot` is not even involved when you use 
`DEFAULT_SYSROOT`, it is injected here:
https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/Driver.cpp#L205

Maybe instead of, the logic in the patch should be setting `-syslibroot` for 
linker in following order:
* `--sysroot`
* `-isysroot`
* `C.getSysRoot()`, which is basically DEFAULT_SYSROOT as other cases is 
handled in `--sysroot`

I don't think DEFAULT_SYSROOT is a common setting, and if it is set, users are 
probably expect to overwrite using `-isysroot` or `--sysroot`.

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

Reply via email to