Added a GYP_DEFINE to add libraries to the link line.

When Chrome is built with -fprofile-generate in *_extra_cflags, it needs to link
against gcov. Adding -lgcov to the link line doesn't help because it occurs
before -Wl,--start-group. This flag correctly adds the required library if used
like the test case described below.

BUG=102550
TEST=GYP_DEFINES="debug_extra_cflags=-fprofile-generate libraries_for_target=-lgcov" ./build/gyp_chromium
make -j5 chrome # passes.


Review URL: http://codereview.chromium.org/10054022

git-svn-id: http://src.chromium.org/svn/trunk/src/build@132061 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
asharif@chromium.org 2012-04-12 21:24:36 +00:00
Родитель 3d925c4195
Коммит e2fad095f6
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -1776,6 +1776,7 @@
# be disabled in ~/.gyp/include.gypi on the valgrind builders.
'variables': {
'werror%': '-Werror',
'libraries_for_target%': '',
},
'defines': [
'_FILE_OFFSET_BITS=64',
@ -1812,6 +1813,9 @@
'ldflags': [
'-pthread', '-Wl,-z,noexecstack',
],
'libraries' : [
'<(libraries_for_target)',
],
'configurations': {
'Debug_Base': {
'variables': {