[cfe-dev] Clang tests are using "clang-scan-deps" from host system?

Jan Svoboda via cfe-dev cfe-dev at lists.llvm.org
Fri Jul 30 05:52:02 PDT 2021


Hi,

Thanks for pointing that out, you're right. I've created a patch that addresses this: https://reviews.llvm.org/D107155

Cheers,
Jan

> On Jul 29, 2021, at 7:57 PM, 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



More information about the cfe-dev mailing list