From 55f9a2f5555c22920c8a4343631270ece0d7a8eb Mon Sep 17 00:00:00 2001 From: Chad Norvell Date: Fri, 28 Apr 2023 05:30:11 +0000 Subject: [PATCH] gn: Generate compile_commands.json by default This increases `gn gen out` time by less than one second: Before: Done. Made 24248 targets from 383 files in 4096ms After: Done. Made 24248 targets from 383 files in 4887ms This is a 19% increase, but it ensures that no additional or special steps are needed to use pw_ide. Change-Id: I0430a5d95de063ca39e36801f9a01537e12305da Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/141590 Commit-Queue: Chad Norvell Reviewed-by: Keir Mierle Reviewed-by: Taylor Cramer --- .gn | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gn b/.gn index e6ddd315a9..0720fd6d49 100644 --- a/.gn +++ b/.gn @@ -14,6 +14,9 @@ buildconfig = "//BUILDCONFIG.gn" +# Generate a compilation database for all targets. +export_compile_commands = [ ":*" ] + default_args = { # Default all upstream Pigweed toolchains to enable pw::span asserts. pw_span_ENABLE_ASSERTS = true