@@ -13,6 +13,7 @@ For the sake of this example, I'll only describe how
13
13
to index scip-clang with cross-repo code navigation support
14
14
for [ Abseil] ( https://github.com/abseil/abseil-cpp/ ) .
15
15
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 ` )
16
17
17
18
> Aside: For a full index, one also needs to run ` sed -e 's|$(STACK_FRAME_UNLIMITED)||' ` on
18
19
> the compilation database due to the unexpanded Make variable used
@@ -63,7 +64,8 @@ Other notes:
63
64
64
65
Tested environments: Ubuntu 18.04, Ubuntu 22.04, macOS 13.
65
66
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.)
67
69
68
70
``` bash
69
71
git clone https://github.com/llvm/llvm-project --depth=1
@@ -72,7 +74,9 @@ cd llvm-project/llvm
72
74
# The LLDB related flags prevent a build error on macOS
73
75
cmake -B ../build -G Ninja \
74
76
-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" \
76
80
-DLLDB_INCLUDE_TESTS=OFF -DLLDB_USE_SYSTEM_DEBUGSERVER=ON \
77
81
-DLLVM_ENABLE_PROJECTS=" all"
78
82
ninja -C ../build
0 commit comments