3
3
- [ scip-clang] ( #scip-clang )
4
4
- [ LLVM] ( #llvm )
5
5
- [ Chromium] ( #chromium )
6
+ - [ Linux] ( #linux )
6
7
- [ Redpanda] ( #redpanda )
7
8
- [ Postgres] ( #postgres )
8
9
- [ Boost] ( #boost )
@@ -68,6 +69,8 @@ Tested environments: Ubuntu 18.04, Ubuntu 22.04, macOS 13.
68
69
Dependencies: ` cmake ` , ` ninja ` , a host toolchain with Clang and LLD.
69
70
(ld on Linux hits OOM even with 64GB RAM.)
70
71
72
+ Approximate index size: 1.8 GB uncompressed, 195 MB compressed
73
+
71
74
``` bash
72
75
git clone https://github.com/llvm/llvm-project --depth=1
73
76
cd llvm-project/llvm
@@ -77,9 +80,9 @@ cmake -B ../build -G Ninja \
77
80
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
78
81
-DCMAKE_BUILD_TYPE=Debug \
79
82
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
80
- -DCMAKE_C_FLAGS=" -g0 -fuse-ld=lld" -DCMAKE_CXX_FLAGS=" -g0 -fuse-ld=lld" \
83
+ -DCMAKE_C_FLAGS=" -g0 -fuse-ld=lld -Wno-unused-command-line-argument " -DCMAKE_CXX_FLAGS=" -g0 -fuse-ld=lld -Wno-unused-command-line-argument " \
81
84
-DLLDB_INCLUDE_TESTS=OFF -DLLDB_USE_SYSTEM_DEBUGSERVER=ON \
82
- -DLLVM_ENABLE_PROJECTS=" all"
85
+ -DLLVM_ENABLE_PROJECTS=" all"
83
86
ninja -C ../build
84
87
scip-clang --compdb-path=build/compile_commands.json
85
88
```
@@ -120,6 +123,30 @@ gn gen out/X --args='symbol_level=0'
120
123
ninja -C out/X
121
124
```
122
125
126
+ ## Linux
127
+
128
+ Tested environments: Ubuntu 22.04
129
+
130
+ Approximate index size: 375 MB uncompressed, 53 MB compressed.
131
+
132
+ Dependencies:
133
+
134
+ ``` bash
135
+ sudo apt install libncurses-dev gawk flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf llvm -y
136
+ ```
137
+
138
+ Build and index:
139
+
140
+ ``` bash
141
+ git clone https://github.com/torvalds/linux.git --depth=10
142
+ cd linux
143
+ make defconfig
144
+ make -j $( nproc)
145
+ # The below only works on kernels newer than v5.10
146
+ ./scripts/clang-tools/gen_compile_commands.py
147
+ scip-clang --compdb-path=compile_commands.json
148
+ ```
149
+
123
150
## Redpanda
124
151
125
152
Tested environments: Ubuntu 22.04
0 commit comments