Skip to content

Commit 198b0f7

Browse files
caneraltinbasakotavio
authored andcommitted
chromium-gn: Remove -g flag
Removed -g flags from arm builds. arm linker is unable to link the image due to image size if -g flag is used: arm-poky-linux-gnueabi-ld.lld: error: output file too large: 7344071860 bytes
1 parent 9533cba commit 198b0f7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

meta-chromium/recipes-browser/chromium/chromium-gn.inc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,13 @@ DEBUG_FLAGS:remove:x86 = "-g"
222222
DEBUG_FLAGS:append:x86 = "-g1"
223223
GN_ARGS += "symbol_level=0"
224224

225+
# For ARM builds, completely remove debug flags that cause binary size issues
226+
# This prevents the "output file too large" linker error on ARM32
227+
CFLAGS:remove:arm = "-g"
228+
CXXFLAGS:remove:arm = "-g"
229+
TARGET_CFLAGS:remove:arm = "-g"
230+
TARGET_CXXFLAGS:remove:arm = "-g"
231+
225232
# As of Chromium 62.0.3202.94 and Yocto Rocko (GCC 7, binutils 2.29), passing
226233
# -g to the compiler results in many linker errors on aarch64, such as:
227234
# obj/third_party/WebKit/Source/modules/payments/libpayments.a(PaymentEventDataConversion.o)(.debug_loc+0x4e25): error: relocation overflow in R_AARCH64_ABS32

0 commit comments

Comments
 (0)