sourcegraph / lsif-clang

Language Server Indexing Format (LSIF) generator for C, C++ and Objective C
https://lsif.dev/
34 stars 8 forks source link

Provide pre-built binaries for Linux #72

Closed varungandhi-src closed 2 years ago

varungandhi-src commented 2 years ago

Using Docker seems like a heavy-weight solution. It'd be nice to provide a pre-built binary which people can use.

(based on a conversation with a customer)

varungandhi-src commented 2 years ago

The problem with this "just working" is because the current build uses dynamic linking as far as I can tell. One one hand, this has the benefit that it speeds up iteration time. On the other hand, this means we can't just provide a binary directly. We need to somehow force the build to link everything statically.

jlisee commented 2 years ago

I tried to get static building to work and gave up fighting the CMake shared library interface linking patterns. That resulted in #78 which simply creates a folder with the binary and all the shared libraries it needs together.

varungandhi-src commented 2 years ago

Closing this since the core pain point around being able to use a self-contained package should be resolved by #83.

(Please feel free to flag this again if the existing solution is not good enough.)

jlisee commented 2 years ago

My personal definition of done for this issue is:

User can download a release from the releases page and run the tool.

This would enable you to re-write the main "Indexing a C++ repository with LSIF" to not say "get your code to build in this new and arbitrary environment". And instead say the simpler:

  1. download these tools
  2. generate a compile_commands.json
  3. use the tools to generate an index and upload

My personal use cases were done as soon as I put up #78 (eventually merged as https://github.com/sourcegraph/lsif-clang/pull/83)

jlisee commented 2 years ago

A good middle ground would be updating both those docs and the docs for the repository to mention this method of building a package so that anyone who wants to can build one.

varungandhi-src commented 2 years ago
varungandhi-src commented 2 years ago

Closing this now; the docs PR to the main Sourcegraph repo should be merged soon.