From c3e866c2105365cfff07c7cbc945b5a7c1908397 Mon Sep 17 00:00:00 2001 From: Roman Rusyaev Date: Mon, 27 Dec 2021 14:24:27 +0300 Subject: [PATCH] Make gdb pretty printing work -fno-limit-debug-info option emits full debug information that makes debugging easier. For more information see https://bugs.llvm.org/show_bug.cgi?id=24202 --- build/config/BUILDCONFIG.gn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn index 8778bcbb63..81fc233d64 100755 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -101,6 +101,10 @@ if (GN_BUILD_TYPE == "RELEASE") { "-ftrapv", "-fstack-check", ] + if (target_toolchain == "//build/toolchain:clang") { + cflags_c += ["-fno-limit-debug-info"] + cflags_cc += ["-fno-limit-debug-info"] + } } else { cflags_cc += [ "-O2", -- Gitee