From 2208ff6ccba9d6a19eadde369a7c303277e98b0a Mon Sep 17 00:00:00 2001 From: Steve Sakoman Date: Thu, 21 Nov 2024 08:55:14 -0800 Subject: [PATCH] llvm: reduce size of -dbg package Unless DEBUG_BUILD is enabled, pass -g1 to massively reduce the size of the debug symbols Level 1 produces minimal information, enough for making backtraces in parts of the program that you don't plan to debug. This includes descriptions of functions and external variables, and line number tables, but no information about local variables. This makes the sstate objects a lot more manageable, and packaging faster. (From OE-Core rev: 13a2f43920c53f9f1bc5ec52eba9eb48da265ef6) Signed-off-by: Steve Sakoman --- meta/recipes-devtools/llvm/llvm_git.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb index 6c2e8a5570..8dcd124c71 100644 --- a/meta/recipes-devtools/llvm/llvm_git.bb +++ b/meta/recipes-devtools/llvm/llvm_git.bb @@ -94,6 +94,8 @@ EXTRA_OECMAKE:append:class-nativesdk = "\ -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \ -DLLVM_CONFIG_PATH=${STAGING_BINDIR_NATIVE}/llvm-config${PV} \ " +# Unless DEBUG_BUILD is enabled, pass -g1 to massively reduce the size of the debug symbols +DEBUG_FLAGS:append = "${@oe.utils.vartrue('DEBUG_BUILD', '', ' -g1', d)}" do_configure:prepend() { # Fix paths in llvm-config