-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parallelize clang-tidy runs #4731
Conversation
Using a script provided by llvm
On my Mac, |
Does /Users/srj/llvm-trunk-install/bin/clang-tidy exist for you? On top of the instructions in the readme I think you need to do a make install and enable the clang-tools-extra project. |
Nope. We should add that to the README. |
Done. |
After doing that, I now can run it on OSX, but it is unable to find ~any of the system , e.g. |
I also get a number of warnings of the form
|
Can you try adding libcxx;libcxxabi to the list of enabled projects? For this to work you need to be able to actually compile c++ with the llvm that you built. Those warnings sound like things that should be fixed. Not sure why I don't get them with my clang-tidy. |
Trying now, but FWIW, that adds a lot to the build (> 1000 files). Since clang-tidy might be available in prebuilt form, it might be worth smartening our script to do something like: (AFAICT, Homebrew doesn't offer a clang-tidy formula on Mac, but the prebuilts you can download include it) |
I think the Makefile is already smart in that way. For any complete llvm install, prebuilt or not, setting LLVM_CONFIG correctly will find the rest of it. It sounds like to run clang-tidy you need a more complete llvm install than you currently have? Or maybe the homebrew prebuilt is only a partial build of llvm? The default value of RUN_CLANG_TIDY points to llvm's standard install location for run-clang-tidy.py using the location of CLANG, which comes from querying llvm-config where to look. |
I'm building from scratch, with |
(FWIW: I never bothered trying |
Yeah, I'm assuming this PR doesn't actually change the requirements for you. If run-clang-tidy.py doesn't work then probably clang-tidy didn't either. |
FYI: after rebuilding llvm with the libcxx;libcxxabi projects enabled, FYI #2: on the master branch,
so, I guess this is a net improvement? Something is wonky but fine with me to land if you like. |
master is missing a key mkdir. It would be interesting to know if clang-tidy works if you manually create bin/build first. |
(OK to land this without the buildbot testing IMHO) |
Using a script provided by llvm. This makes it way faster to clang-tidy a branch before opening a PR.