diff --git a/BUILDCONFIG.gn b/BUILDCONFIG.gn index d24887ecc..fd625f596 100644 --- a/BUILDCONFIG.gn +++ b/BUILDCONFIG.gn @@ -69,10 +69,7 @@ template("_pw_override_target_with_defaults") { } # Add default configs to use for all binary build targets. - configs += [ - "$dir_pw_build:reduced_size", - "$dir_pw_build:strict_warnings", - ] + configs += [ "$dir_pw_build:default" ] } } diff --git a/pw_build/BUILD.gn b/pw_build/BUILD.gn index 9383f60b8..a32e49cdd 100644 --- a/pw_build/BUILD.gn +++ b/pw_build/BUILD.gn @@ -14,6 +14,20 @@ import("$dir_pw_docgen/docs.gni") +# The default config is applied to all targets in Pigweed's BUILDCONFIG.gn. +config("default") { + configs = [ + ":debugging", + ":reduced_size", + ":strict_warnings", + ] +} + +config("debugging") { + # Enable debug symbol generation. This has no effect on final code size. + cflags = [ "-g" ] +} + # Standard compiler flags to reduce output binary size. config("reduced_size") { cflags = [