linux: Fix linking with system libraries

This commit is contained in:
Cheng Zhao 2015-04-08 08:22:55 +00:00
parent c5f8e4360c
commit 891856f3af
2 changed files with 27 additions and 4 deletions

View file

@ -92,10 +92,23 @@
'common/main_delegate.h',
'common/main_delegate_mac.mm',
],
'link_settings': {
'libraries': [ '<@(libchromiumcontent_libraries)' ]
},
'conditions': [
['OS=="linux" and libchromiumcontent_component==0', {
# On Linux we have to use "--whole-archive" to force executable
# to include all symbols, otherwise we will have plenty of
# unresolved symbols errors.
'direct_dependent_settings': {
'ldflags': [
'-Wl,--whole-archive',
'<@(libchromiumcontent_libraries)',
'-Wl,--no-whole-archive',
],
}
}, {
'link_settings': {
'libraries': [ '<@(libchromiumcontent_libraries)' ]
},
}],
['OS=="linux"', {
'cflags_cc': [
'-Wno-deprecated-register',
@ -121,6 +134,16 @@
'link_settings': {
'libraries': [
'<(libchromiumcontent_dir)/libboringssl.so',
'-lasound',
'-lcap',
'-lcups',
'-lrt',
'-ldl',
'-lresolv',
'-lfontconfig',
'-lfreetype',
'-lX11 -lXi -lXcursor -lXext -lXfixes -lXrender -lXcomposite -lXdamage -lXtst -lXrandr',
'-lexpat',
],
},
}],

@ -1 +1 @@
Subproject commit c94e623f5951db672958f10b098808fc2017ea40
Subproject commit 09c2eb301ceb50f1ae01f9ba7af4a2adf77a4d87