[cfe-dev] Clang tests are using "clang-scan-deps" from host system?
Xun Li via cfe-dev
cfe-dev at lists.llvm.org
Thu Jul 29 11:04:34 PDT 2021
Sorry, to clarify, I double checked, it seems like in the test is it
somehow able to correctly associate the tool to the one from the build
dir, but just not printing out the absolute path.
So I guess it uses the search path in the environment variable when
running the test?
Still, I think we should be consistent on using absolute path (so that
it's easier to rerun the commands manually).
On Thu, Jul 29, 2021 at 11:02 AM David Blaikie <dblaikie at gmail.com> wrote:
>
> Sounds like a bug to me. There's a list of tool replacements in the lit configs somewhere I think, that's probably missing clang-scan-deps, I guess. (maybe we could make this mechanism more robust/less easy to skip/misuse)
>
> Probably worth cc'ing/pulling someone into this thread who works on clang-scan-deps, folks don't always keep up on all the mailing lists.
>
> On Thu, Jul 29, 2021 at 10:58 AM Xun Li via cfe-dev <cfe-dev at lists.llvm.org> wrote:
>>
>> I was playing with modules in Clang.
>> And I noticed that when running Clang tests, they are using the
>> "clang-scan-deps" tool from my host system instead of from the build
>> dir.
>> For example, if I do:
>> ```
>> bin/llvm-lit ../clang/test/ClangScanDeps/modules-pch.c -a
>> ```
>> And look at the output commands, I see things like:
>> ```
>> : 'RUN: at line 11'; clang-scan-deps -compilation-database
>> /Users/xun/OSS/llvm-project/build_clang/tools/clang/test/ClangScanDeps/Output/modules-pch.c.tmp/cdb.json
>> -format experimental-full -generate-modules-path-args -module
>> -files-dir /Users/xun/OSS/llvm-project/build_clang/tools/clang/test/ClangScanDeps/Output/modules-pch.c.tmp/build
>> >> /Users/xun/OSS/llvm-project/build_clang/tools/clang/test/ClangScanDeps/Output/modules-pch.c.tmp/result_pch.json
>> ```
>> where clang-scan-deps is not using an absolute path. I verified this
>> by adding "clang-scan-deps --version" in the test, and it matches my
>> system version, instead of the build version.
>>
>> Is this a bug?
>>
>> --
>> Xun
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
--
Xun
More information about the cfe-dev
mailing list