Skip to content

Commit

Permalink
Clean up uses of use_glib that are not related to glib dependencies
Browse files Browse the repository at this point in the history
We're frequently using the use_glib gyp variable as a shorthand for:

  OS!="win" and OS!="mac" and OS!="ios" and OS!="android"

This should be equivalent to:

  desktop_linux == 1 or chromeos == 1

Embedded builds want to remove as many dependencies as possible. This
cleans up uses of the use_glib variable so we can turn it off on linux
without breaking the build.

BUG=316226

Review URL: https://codereview.chromium.org/61923004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233804 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
spang@chromium.org committed Nov 8, 2013
1 parent c2901e4 commit b098e1d
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 26 deletions.
32 changes: 22 additions & 10 deletions base/base.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
],
},
'conditions': [
['use_glib==1', {
['desktop_linux == 1 or chromeos == 1', {
'conditions': [
['chromeos==1', {
'sources/': [ ['include', '_chromeos\\.cc$'] ]
Expand All @@ -51,7 +51,6 @@
],
'dependencies': [
'symbolize',
'../build/linux/system.gyp:glib',
'xdg_mime',
],
'defines': [
Expand All @@ -60,15 +59,20 @@
'cflags': [
'-Wno-write-strings',
],
'export_dependent_settings': [
'../build/linux/system.gyp:glib',
],
}, { # use_glib!=1
}, { # desktop_linux == 0 and chromeos == 0
'sources/': [
['exclude', '/xdg_user_dirs/'],
['exclude', '_nss\\.cc$'],
],
}],
['use_glib==1', {
'dependencies': [
'../build/linux/system.gyp:glib',
],
'export_dependent_settings': [
'../build/linux/system.gyp:glib',
],
}],
['use_x11==1', {
'dependencies': [
'../build/linux/system.gyp:x11',
Expand Down Expand Up @@ -688,7 +692,7 @@
'module_dir': 'base'
},
'conditions': [
['use_glib==1', {
['desktop_linux == 1 or chromeos == 1', {
'defines': [
'USE_SYMBOLIZE',
],
Expand Down Expand Up @@ -749,7 +753,7 @@
},
],
}],
['use_glib==1', {
['desktop_linux == 1 or chromeos == 1', {
'sources!': [
'file_version_info_unittest.cc',
],
Expand All @@ -764,11 +768,19 @@
}],
],
'dependencies': [
'../build/linux/system.gyp:glib',
'../build/linux/system.gyp:ssl',
],
}],
['use_x11 == 1', {
'dependencies': [
'../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
],
}, { # use_glib!=1
}],
['use_glib == 1', {
'dependencies': [
'../build/linux/system.gyp:glib',
],
}, { # use_glib == 0
'sources!': [
'message_loop/message_pump_glib_unittest.cc',
]
Expand Down
10 changes: 9 additions & 1 deletion base/base.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -699,13 +699,21 @@
4018,
],
'target_conditions': [
['<(use_glib)==0 or >(nacl_untrusted_build)==1', {
['(<(desktop_linux) == 0 and <(chromeos) == 0) or >(nacl_untrusted_build)==1', {
'sources/': [
['exclude', '^nix/'],
],
'sources!': [
'atomicops_internals_x86_gcc.cc',
],
}],
['<(use_glib)==0 or >(nacl_untrusted_build)==1', {
'sources!': [
'message_loop/message_pump_glib.cc',
],
}],
['<(use_x11)==0 or >(nacl_untrusted_build)==1', {
'sources!': [
'message_loop/message_pump_x11.cc',
],
}],
Expand Down
8 changes: 5 additions & 3 deletions net/net.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1317,6 +1317,8 @@
'../build/linux/system.gyp:gconf',
'../build/linux/system.gyp:gio',
],
}],
[ 'desktop_linux == 1 or chromeos == 1', {
'conditions': [
['use_openssl==1', {
'dependencies': [
Expand Down Expand Up @@ -1998,11 +2000,11 @@
'net_test_jni_headers',
],
}],
[ 'use_glib == 1', {
[ 'desktop_linux == 1 or chromeos == 1', {
'dependencies': [
'../build/linux/system.gyp:ssl',
],
}, { # else use_glib == 0: !posix || mac
}, { # desktop_linux == 0 and chromeos == 0
'sources!': [
'cert/nss_cert_database_unittest.cc',
],
Expand Down Expand Up @@ -2035,7 +2037,7 @@
'http/mock_gssapi_library_posix.h',
],
}],
[ 'use_openssl == 1 or (use_glib == 0 and OS != "ios")', {
[ 'use_openssl == 1 or (desktop_linux == 0 and chromeos == 0 and OS != "ios")', {
# Only include this test when on Posix and using NSS for
# cert verification or on iOS (which also uses NSS for certs).
'sources!': [
Expand Down
2 changes: 1 addition & 1 deletion skia/skia_common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
[ 'OS != "win"', {
'sources/': [ ['exclude', '_win\\.(cc|cpp)$'] ],
}],
[ 'use_glib == 0', {
[ 'desktop_linux == 0 and chromeos == 0', {
'sources/': [ ['exclude', '_linux\\.(cc|cpp)$'] ],
}],
],
Expand Down
6 changes: 3 additions & 3 deletions skia/skia_library.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
'../third_party/skia/src/opts/opts_check_SSE2.cpp'
],
}],
[ 'use_glib == 1', {
[ 'desktop_linux == 1 or chromeos == 1', {
'dependencies': [
'../build/linux/system.gyp:fontconfig',
'../build/linux/system.gyp:freetype2',
Expand All @@ -280,13 +280,13 @@
'-Wno-unused-function',
],
}],
[ 'use_glib == 0', {
[ 'OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
'sources!': [
'../third_party/skia/src/ports/SkFontConfigInterface_direct.cpp',
'../third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp',
],
}],
[ 'use_glib == 0 and OS != "android"', {
[ 'OS=="win" or OS=="mac" or OS=="ios"', {
'sources!': [
'../third_party/skia/src/ports/SkFontHost_FreeType.cpp',
'../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp',
Expand Down
2 changes: 1 addition & 1 deletion ui/app_list/app_list.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
['exclude', 'cocoa/'],
],
}],
['use_glib == 1 or OS == "ios"', {
['desktop_linux == 1 or chromeos == 1 or OS == "ios"', {
'dependencies': [
'../base/strings/ui_strings.gyp:ui_unittest_strings',
],
Expand Down
2 changes: 1 addition & 1 deletion ui/message_center/message_center.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
'test/run_all_unittests.cc',
],
'conditions': [
['use_glib == 1 or OS == "ios"', {
['desktop_linux == 1 or chromeos == 1 or OS=="ios"', {
'dependencies': [
'../base/strings/ui_strings.gyp:ui_unittest_strings',
],
Expand Down
12 changes: 7 additions & 5 deletions ui/ui.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@
'../build/linux/system.gyp:fontconfig',
'../build/linux/system.gyp:glib',
],
}],
['desktop_linux == 1 or chromeos == 1', {
'conditions': [
['toolkit_views==0 and use_aura==0', {
# Note: because of gyp predence rules this has to be defined as
Expand All @@ -419,11 +421,11 @@
['include', '^base/dragdrop/os_exchange_data.cc'],
],
}],
['use_pango==1', {
'dependencies': [
'../build/linux/system.gyp:pangocairo',
],
}],
],
}],
['use_pango==1', {
'dependencies': [
'../build/linux/system.gyp:pangocairo',
],
}],
['chromeos==1 or (use_aura==1 and OS=="linux" and use_x11==0)', {
Expand Down
2 changes: 1 addition & 1 deletion ui/ui_unittests.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
'../testing/android/native_test.gyp:native_test_native_code',
],
}],
['use_glib == 1 or OS == "ios"', {
['desktop_linux == 1 or chromeos == 1 or OS == "ios"', {
'dependencies': [
'base/strings/ui_strings.gyp:ui_unittest_strings',
],
Expand Down

0 comments on commit b098e1d

Please sign in to comment.