Skip to content

Commit d33d48e

Browse files
docs: Tweak indexing instructions for LLVM (#396)
1 parent 852bf47 commit d33d48e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/IndexingProjects.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ For the sake of this example, I'll only describe how
1313
to index scip-clang with cross-repo code navigation support
1414
for [Abseil](https://github.com/abseil/abseil-cpp/).
1515
See [tools/package-map.json](/tools/package-map.json) for more entries
16+
(the absolute path in it is obtained via `bazel info output_base`)
1617

1718
> Aside: For a full index, one also needs to run `sed -e 's|$(STACK_FRAME_UNLIMITED)||'` on
1819
> the compilation database due to the unexpanded Make variable used
@@ -63,7 +64,8 @@ Other notes:
6364

6465
Tested environments: Ubuntu 18.04, Ubuntu 22.04, macOS 13.
6566

66-
Dependencies: `cmake`, `ninja`, a host toolchain.
67+
Dependencies: `cmake`, `ninja`, a host toolchain with Clang and LLD.
68+
(ld on Linux hits OOM even with 64GB RAM.)
6769

6870
```bash
6971
git clone https://github.com/llvm/llvm-project --depth=1
@@ -72,7 +74,9 @@ cd llvm-project/llvm
7274
# The LLDB related flags prevent a build error on macOS
7375
cmake -B ../build -G Ninja \
7476
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
75-
-DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-g0" -DCMAKE_CXX_FLAGS="-g0" \
77+
-DCMAKE_BUILD_TYPE=Debug \
78+
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
79+
-DCMAKE_C_FLAGS="-g0 -fuse-ld=lld" -DCMAKE_CXX_FLAGS="-g0 -fuse-ld=lld" \
7680
-DLLDB_INCLUDE_TESTS=OFF -DLLDB_USE_SYSTEM_DEBUGSERVER=ON \
7781
-DLLVM_ENABLE_PROJECTS="all"
7882
ninja -C ../build

0 commit comments

Comments
 (0)