sourcegraph / lsif-clang

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

Add a self contained Ubuntu 18.04 based linux build #78

Closed jlisee closed 2 years ago

jlisee commented 2 years ago

This provides a self contained pre-built linux version of lsif-clang. It builds source code on Ubuntu 18.04 then copies all the shared libraries needed except libc and the dynamic linker. The actual binary is replaced with a shim that places that shared library folder on the LD_LIBRARY_PATH.

The result is an archive that lets you run the tool on pretty much any Linux system.

Test plan

Build the tooling in the container:

./clang-tools-extra/lsif-clang/package/build.sh

Run the shim that uses the locally libraries:

$ ./lsif-clang-aurora-f59df9887768ff61adad5d16df98ce667db7a4dd/lsif-clang --version
LLVM (http://llvm.org/):
  LLVM version 11.1.0

  Optimized build.
  Default target: x86_64-pc-linux-gnu
  Host CPU: skylake-avx512
varungandhi-src commented 2 years ago

I'm created a separate PR addressing some of the PR review comments, and solicit your feedback there on some points I'm unsure about. https://github.com/sourcegraph/lsif-clang/pull/83

Closing this PR in favor of that one; right now, the CI doesn't run properly for PRs coming from forks.