[libcxx-commits] [PATCH] D117268: [libc++] Install clang-tidy in docker containers and create command db symlink

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 14 09:52:44 PST 2022


ldionne added inline comments.


================
Comment at: libcxx/utils/ci/run-buildbot:200
                    -DLIBUNWIND_TEST_CONFIG="llvm-libunwind-shared.cfg.in"
+    create-db-symlink
     check-runtimes
----------------
philnik wrote:
> ldionne wrote:
> > Mordante wrote:
> > > I wonder whether we need this in all configurations.
> > > Secondly let's make sure we export the compile commands in the configuration where we use this.
> > I think we need to, because the `clang-tidy` check is run in all configurations.
> @ldionne
> Is there any way to run the test only if clang-tidy is found and there is a `compile_commands.json` in the root directory? Otherwise this would require clang-tidy for the libc++ test suite to succeed.
> 
> @Mordante 
> I didn't put it in all configs. I don't know exactly what configs we want to check. Do we only want to check C++20 code or do we want to check all code? I think the different platforms should all be checked, since there are a few places where we have platform-specific code.
For checking whether `clang-tidy` exists, you can add this to `libcxx/utils/libcxx/test/features.py`:

```
Feature(name='has-clang-tidy',
        when=lambda cfg: runScriptExitCode(cfg, ['clang-tidy --version']) != 0),
```

(assuming `clang-tidy --version` makes sense)

For `compile_commands.json`, like I said in my other comment, I would much rather we produce something that `clang-tidy` can use unconditionally -- is that realistic?



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117268



More information about the libcxx-commits mailing list