[PATCH] D108366: [clang][deps] Deduce resource directory from the compiler path

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 23 04:43:05 PDT 2021


jansvoboda11 added a comment.

In D108366#2955322 <https://reviews.llvm.org/D108366#2955322>, @dexonsmith wrote:

> The patch seems mostly straightforward, but can you clarify whether there was a functionality change for clang-scan-deps? My reading of the code suggests not, because it was using ResourceDirectoryCache before and still will... in which case, can you walk me through how the test covers this code change? (Maybe some comments in the test would help.)

For `clang-scan-deps`, this is //almost// NFC. This code kicks in iff `ResourceDirectoryCache` doesn't provide any result:

- the execution of `CommandLine[0] -print-resource-dir` command returns a non-zero exit code (exercised in the test) or doesn't print anything,
- the `CommandLine` is empty,
- the compiler executable (`CommandLine[0]`) is not an absolute path.

That's why I want to check with people if we can agree on removing `ResourceDirectoryCache`. I'd be keen on updating this patch to include the change and make the test more obviously correct.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108366/new/

https://reviews.llvm.org/D108366



More information about the cfe-commits mailing list