From 1dd52964ca4288e96b7b5bdbb146dffcadc57e04 Mon Sep 17 00:00:00 2001 From: "oshima@chromium.org" Date: Sat, 15 May 2010 01:02:51 +0000 Subject: Fix bad_alloc linkage error on chromeos valgrind bots. part 1. Seems like some of test binaries are now big enough that gold cannot link with gc-sectinos. This CL add gyp variable to turn it off. I'll add this flag to master.cfg in separate CL. BUG=44241 TEST=chromeos valgrind bot should be able to link test binaries. Review URL: http://codereview.chromium.org/2112004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47351 0039d316-1c4b-4281-b951-d872f2087c98 --- build/common.gypi | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/build/common.gypi b/build/common.gypi index f457a2b..0e66dba 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -899,6 +899,13 @@ 'Release_Base': { 'variables': { 'release_optimize%': '2', + # Binaries become big and gold is unable to perform GC + # and remove unused sections for some of test targets + # on 32 bit platform. + # (This is currently observed only in chromeos valgrind bots) + # The following flag is to disable --gc-sections linker + # option for these bots. + 'no_gc_sections%': 0, }, 'cflags': [ '-O>(release_optimize)', @@ -910,9 +917,13 @@ '-fdata-sections', '-ffunction-sections', ], - 'ldflags': [ - '-Wl,--gc-sections', - ], + 'conditions' : [ + ['no_gc_sections==0', { + 'ldflags': [ + '-Wl,--gc-sections', + ], + }], + ] }, }, 'variants': { -- cgit v1.1