This is an archive of the discontinued LLVM Phabricator instance.

gn build: make clangd depend on clang resource headers
ClosedPublic

Authored by ilya-biryukov on May 27 2019, 4:28 AM.

Details

Summary

clangd needs them to function properly, even though they are not
strictly required for the build.

Diff Detail

Repository
rL LLVM

Event Timeline

ilya-biryukov created this revision.May 27 2019, 4:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 27 2019, 4:28 AM

Thanks for the patch!

Does the cmake build have this dependency? If so, where? I tried to find it for a bit but failed. Alternatively, if there's a reason why the gn build needs this but the cmake build doesn't, that works too :)

The dependency is there in CMake, although it took me awhile to dig it out for first time.
It is added by add_clang_tool, see AddClang.cmake.

Obviously, we want the same dependency on other instances of add_clang_tool. The lack of this dependency can only be noticed when building a tool in a clean build directory without building clang. Worse yet, it will build just fine, but would fail to find the builtin headers at runtime.

thakis accepted this revision.May 28 2019, 7:01 AM

Thanks!

This revision is now accepted and ready to land.May 28 2019, 7:01 AM
This revision was automatically updated to reflect the committed changes.