Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismwendt committed Nov 18, 2019
1 parent 57aab09 commit 5c9ab4e
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,32 @@ Visit https://lsif.dev/ to learn about LSIF.

## Prerequisites

- [Node.js](https://nodejs.org/en/) (macOS: `brew install node`)
- [Yarn](https://yarnpkg.com/lang/en/) (macOS: `npm i -g yarn`)
- [Node.js](https://nodejs.org/en/)
- [Yarn](https://yarnpkg.com/lang/en/)
- [make](https://www.gnu.org/software/make/)
- A C++ compiler
- A C++ compiler with LLVM dev headers (versions 3 through 8 are supported)

**macOS**

```
brew install git node llvm@8
npm i -g yarn
```

**Ubuntu 18.04**

```
apt-get update && apt-get install -y git nodejs npm clang libclang-dev llvm
npm i -g yarn
```

## Installation

Build the instrumented compiler and the LSIF conversion tool:

```
git clone https://github.com/sourcegraph/lsif-cpp
cd lsif-cpp
./build
```

Expand All @@ -29,12 +45,19 @@ env \
<path to lsif-cpp>/generate-csv "\$CXX -c *.cpp"
```

> - `ABSROOTDIR`: the absolute path to your project directory (the script will `cd` here before running the compilation command)
> - `ABSOUTDIR`: the absolute path to the directory where the generated CSV files will be written
Convert those CSV files into LSIF:

```
node \
<path to lsif-cpp>/out/main.js \
--csvFileGlob="examples/cross-app/output/*.csv" \
--root=examples/cross-app/root \
--out app.lsif
--out examples/cross-app/root/dump.lsif
```

> - `--csvFileGlob`: the wildcard pattern that matches all CSV files written to `ABSOUTDIR` by the `generate-csv` command
> - `--root`: the path to `ABSROOTDIR`
> - `--out`: the path where the LSIF dump will be written

0 comments on commit 5c9ab4e

Please sign in to comment.