Commit 7afeb17
authored
[CMake] Export compile commands by default (#364)
* [CMake] Export compile commands by default
The compilation database should be useful for many LLVM development tasks, for example, debugging compilation of a specific TU in the test suite. It is fairly conservative, writing a single new file, whose size is ~9MiB for the default buil on macOS. Users which already enable it should not see any difference. Thus I think we should just write it by default. It shouldnt break tests.
Guarding the setting by `if (CMAKE_EXPORT_COMPILE_COMMANDS STREQUAL "")` to enable users to restore old behavior if needed. `STREQUAL` is required because CMake defines this variable to `""` by default.
LLVM already exports the compile commands, I think without even allowing a user override. Here we're even more conservative.
* change 1 to ON1 parent 62174ae commit 7afeb17
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
333 | 337 | | |
334 | 338 | | |
335 | 339 | | |
| |||
0 commit comments