Page MenuHomePhabricator

[clang-tidy] install helper scripts in CMake build
ClosedPublic

Authored by Eugene.Zelenko on Sep 8 2015, 11:47 AM.

Details

Summary

Scripts are installed in same location as clang-fromat ones, so I think will be good idea to not create dedicated directory.

I checked this patch on my own build on RHEL 6.

Please check it in if it's OK, because I don't have SVN write access.

I think will be good idea to backport this patch to 3.7 release branch.

Probably same should be done for configure build.

Diff Detail

Event Timeline

Eugene.Zelenko retitled this revision from to [clang-tidy] install helper scripts in CMake build.
Eugene.Zelenko updated this object.
Eugene.Zelenko added a reviewer: alexfh.
alexfh edited edge metadata.
alexfh added a subscriber: cfe-commits.

Not sure whether the scripts should go to share/clang or some other place. Sylvestre should know what's the common practice. Also, configure builds are still used for building packages, AFAIU, so they have to be modified as well (preferably, in the same patch).

On my understanding share contains architecture-independent files.

clang-format files installation is also part of CMake build only.

share/clang is fine, thanks.

share/clang is fine, thanks.

Then we need to make a similar change to the configure build. Eugene, can you do this?

Eugene.Zelenko edited edge metadata.
Eugene.Zelenko set the repository for this revision to rL LLVM.

I added installation in configure. See also D12919 for further configure improvements idea.

This revision was automatically updated to reflect the committed changes.

LG. Thanks!

Not sure what the exact problem is, but we still have one bot using configure/make, and it dies with this on the install step unless we use -j1. I know the hand-written Makefiles are deprecated and we've worked around it, but I thought I should mention it.

I think will be good idea to ask specialist in configure build to look on make file. I used other Clang or LLVM make file as example. Frankly, I don't see anything bad with it.

However this fix was backported to 3.7.x and configure build is still supported there.

If root cause will not be found, it' OK for me to remove installation from configure build, since I use CMake one for my build.

The problem is that making the install-local target will try to create the PROJ_sharedir directory in parallel with trying to copy DESTFILES to that directory. You need to set up the dependencies such that the directory is guaranteed to be created first. If you move the PROJ_sharedir dependency from the install-local target to the DESTFILES target that should solve it:

$(DESTFILES): $(SRCFILES) $(PROJ_sharedir)
...
install-local:: $(DESTFILES)