[clang] [clang][scan-build] Treat --use-cc and --use-c++ as shell commands (PR #131932)

Florian Ragwitz via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 21 07:46:26 PDT 2025


rafl wrote:

> I'd prefer option 2, because why else would we have a default compiler if that wasn't used in some workflows. A warning could never hurt.

`--use-cc`/`--use-c++`/`CCC_CC`/`CCC_CXX` are optional, so the default would still be used when those options are not specified, which might be the majority of use-cases.

I've added a few additional commits:

* 6806e42d3c76 includes some minor simplifications and deduplicates the logic we're talking about without changing behaviour.
*  e101c97b60f2 implements option 2, as that was your preference.
*  b086d3ecad7e implements my preferred option 3. I'd happy to drop this commit if we wanna stick with option 2 instead.
* 805396fa1ec1 brings the handling of `CLANG`/`CLANG_CXX` in line with `CCC_CC`/`CCC_CXX` if we end up going for option 3. We'd also drop this if we go for option 2.

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


More information about the cfe-commits mailing list