Generate compilation database by default

This will generate a JSON compilation database for all build targets by
default. This is useful for LSP servers and other tools for properly
interacting with the build system. Previously, users have been able to
this manually by appending a flag to gn gen.

Bug: None
Change-Id: I9cdf501b5c392314eae53010ef2d9928769809a8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355941
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42558}
This commit is contained in:
Emil Lundmark 2024-06-28 09:39:35 +02:00 committed by WebRTC LUCI CQ
parent c7bac48b60
commit 2360208f7d

2
.gn
View File

@ -41,6 +41,8 @@ no_check_targets = [
exec_script_whitelist = build_dotfile_settings.exec_script_whitelist + exec_script_whitelist = build_dotfile_settings.exec_script_whitelist +
[ "//build_overrides/build.gni" ] [ "//build_overrides/build.gni" ]
export_compile_commands = [ "*" ]
default_args = { default_args = {
# Webrtc does not support component builds because we are not using the # Webrtc does not support component builds because we are not using the
# template "component" but we rely directly on "rtc_static_library" and # template "component" but we rely directly on "rtc_static_library" and