diff options
author | nick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-18 17:25:09 +0000 |
---|---|---|
committer | nick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-18 17:25:09 +0000 |
commit | 4ab3284c3e8c1e318614f8e2067eb1d1441623ea (patch) | |
tree | 6e5e8c72cbfccd39376d194707dcf68eaae65fd8 /chrome | |
parent | 4ea8365f6a66ff9397abc559086436b633a021fb (diff) | |
download | chromium_src-4ab3284c3e8c1e318614f8e2067eb1d1441623ea.zip chromium_src-4ab3284c3e8c1e318614f8e2067eb1d1441623ea.tar.gz chromium_src-4ab3284c3e8c1e318614f8e2067eb1d1441623ea.tar.bz2 |
syncapi shared lib: always. Build a stub
if the binaries are not available. For
a Chrome-branded release, pull the binaries
from elsewhere.
For a release where CHROME_PERSONALIZATION is disabled,
(e.g. Mac and Linux), we needn't build this.
TEST=build and run with a variety of commandline flags + clobber try server
BUG=none
Review URL: http://codereview.chromium.org/171096
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23639 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/chrome.dll.deps | 1 | ||||
-rw-r--r-- | chrome/browser/sync/profile_sync_service_unittest.cc | 2 | ||||
-rw-r--r-- | chrome/chrome.gyp | 134 | ||||
-rw-r--r-- | chrome/installer/mini_installer/chrome.release | 2 | ||||
-rw-r--r-- | chrome/tools/build/win/FILES | 3 |
5 files changed, 121 insertions, 21 deletions
diff --git a/chrome/app/chrome.dll.deps b/chrome/app/chrome.dll.deps index 76e8b0d..ebbd9bb 100644 --- a/chrome/app/chrome.dll.deps +++ b/chrome/app/chrome.dll.deps @@ -33,4 +33,5 @@ delay_loaded = [ 'avcodec-52.dll', 'avformat-52.dll', 'avutil-50.dll', + 'syncapi.dll', ] diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc index cc7f4c6..ef12916 100644 --- a/chrome/browser/sync/profile_sync_service_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_unittest.cc @@ -3,7 +3,6 @@ // found in the LICENSE file. #ifdef CHROME_PERSONALIZATION -#ifndef COMPILING_SYNCAPI_STUB // This test requires the real-deal syncapi. #include <stack> #include <vector> @@ -1267,5 +1266,4 @@ TEST_F(ProfileSyncServiceTestWithData, RecoverAfterDeletingSyncDataDirectory) { ExpectModelMatch(); } -#endif // COMPILING_SYNCAPI_STUB #endif // CHROME_PERSONALIZATION diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 0ad4e01..237fa1c 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -6,12 +6,6 @@ 'variables': { 'chromium_code': 1, - # Whether or not browser sync code is built in. - 'chrome_personalization': 1, - - # Used to build and statically link a stub (no-op) syncapi engine. - 'use_syncapi_stub' : 1, - # Define the common dependencies that contain all the actual # Chromium functionality. This list gets pulled in below by # the link of the actual chrome (or chromium) executable on @@ -21,6 +15,7 @@ 'browser', 'debugger', 'renderer', + 'syncapi', 'utility', 'worker', '../printing/printing.gyp:printing', @@ -88,8 +83,24 @@ }], # branding ], # conditions }], # OS=="mac" + ['OS=="win"', { + # Whether or not browser sync code is built in. + 'chrome_personalization%': 1, + + # Used to build a stub (no-op) syncapi engine. + 'conditions': [ + ['branding=="Chrome"', { + 'use_syncapi_stub%': 0, + }, { + 'use_syncapi_stub%': 1, + }], + ], + }, { + 'chrome_personalization%': 0, + 'use_syncapi_stub%': 1, + }], ], # conditions - }, + }, # variables 'includes': [ '../build/common.gypi', ], @@ -121,9 +132,6 @@ ['OS=="linux" and toolkit_views==1', {'sources/': [ ['include', '_views\\.cc$'], ]}], - ['OS=="win" and use_syncapi_stub==1', { - 'defines': ['COMPILING_SYNCAPI_STUB'], - }], # use_syncapi_stub==1 ['OS=="win" and chrome_personalization==1', { 'defines': ['CHROME_PERSONALIZATION=1'], }], # chrome_personalization==1 @@ -854,8 +862,8 @@ 'browser/cocoa/download_shelf_view.h', 'browser/cocoa/download_shelf_view.mm', 'browser/cocoa/download_started_animation_mac.mm', - 'browser/cocoa/download_util_mac.h', - 'browser/cocoa/download_util_mac.mm', + 'browser/cocoa/download_util_mac.h', + 'browser/cocoa/download_util_mac.mm', 'browser/cocoa/encoding_menu_controller_delegate_mac.h', 'browser/cocoa/encoding_menu_controller_delegate_mac.mm', 'browser/cocoa/find_bar_bridge.h', @@ -2244,13 +2252,6 @@ 'msvs_precompiled_source': 'tools/build/win/precompiled_wtl.cc', }, }, - 'conditions': [ - ['use_syncapi_stub==1', { - 'sources': [ - 'browser/sync/engine/syncapi_stub.cc', - ], - }] # use_syncapi_stub==1 - ], }, { # 'OS!="win" 'sources/': [ # Exclude all of hang_monitor. @@ -3582,6 +3583,7 @@ 'common', 'chrome_resources', 'chrome_strings', + 'syncapi', 'test_support_ui', '../base/base.gyp:base', '../net/net.gyp:net', @@ -3726,6 +3728,7 @@ 'common', 'debugger', 'renderer', + 'syncapi', 'test_support_unit', 'utility', '../app/app.gyp:app_resources', @@ -4162,6 +4165,11 @@ 'test/browser_with_test_window_test.h', ], }], + ['use_syncapi_stub==1', { # These tests require a non-stub sync impl. + 'sources!': [ + 'browser/sync/profile_sync_service_unittest.cc', + ] + }], ], }, { @@ -4200,6 +4208,89 @@ ], }, { + # Provides a syncapi dynamic library target from checked-in binaries, + # or from compiling a stub implementation. + 'target_name': 'syncapi', + + 'conditions': [ + ['chrome_personalization==0', { + # Empty target. + 'type': 'none', + }], + ['chrome_personalization==1 and use_syncapi_stub==1', { + # Build a stub library. + 'type': 'shared_library', + 'defines': [ + 'COMPILING_SYNCAPI_LIBRARY' + ], + 'sources': [ + 'browser/sync/engine/syncapi_stub.cc', + ], + 'include_dirs': [ + '..', + ], + 'dependencies': [ + '../base/base.gyp:base', + ], + }], + ['chrome_personalization==1 and use_syncapi_stub==0', { + 'type': 'none', + 'conditions': [ + # Linux-specific rules for using syncapi binaries. + ['OS=="linux"', { + # TODO(timsteele): Not sure if this linux-specific stuff + # works anymore. + 'copies': [ + { + 'destination': '<(PRODUCT_DIR)/lib', + 'files': [ + 'personalization/sync/engine/<(CONFIGURATION_NAME)/libsyncapi.so', + ], + }, + ], + 'link_settings': { + 'libraries': [ + '-lsyncapi', + ], + }, + }], # OS=="linux" + # Windows-specific rules for using syncapi binaries. + ['OS=="win"', { + 'direct_dependent_settings': { + 'link_settings': { + 'libraries': [ + 'personalization/sync/engine/<(CONFIGURATION_NAME)/syncapi.lib', + ], + }, + }, + 'copies': [ + { + 'destination': '<(PRODUCT_DIR)', + 'files': [ + 'personalization/sync/engine/<(CONFIGURATION_NAME)/syncapi.dll', + 'personalization/sync/engine/<(CONFIGURATION_NAME)/syncapi_dll.pdb', + 'personalization/sync/engine/<(CONFIGURATION_NAME)/pthreads.dll', + 'personalization/sync/engine/<(CONFIGURATION_NAME)/pthreads_dll.pdb', + ], + }, + ], + }], # OS=="win" + ], + }], + ['chrome_personalization==1 and OS=="win"', { + 'direct_dependent_settings': { # Shared by stub and non-stub. + 'msvs_settings': { + 'VCLinkerTool': { + 'DelayLoadDLLs': [ + 'syncapi.dll', + ], + }, + }, + }, + }], + ], # chrome_personalization / use_syncapi_stub condition chain. + }, + { 'target_name': 'page_cycler_tests', 'type': 'executable', 'msvs_guid': 'C9E0BD1D-B175-4A91-8380-3FDC81FAB9D7', @@ -4752,6 +4843,7 @@ 'common', 'debugger', 'renderer', + 'syncapi', 'chrome_resources', 'chrome_strings', '../base/base.gyp:base', @@ -4810,6 +4902,7 @@ 'debugger', 'test_support_common', 'test_support_ui', + 'syncapi', 'third_party/hunspell/hunspell.gyp:hunspell', '../net/net.gyp:net_resources', '../skia/skia.gyp:skia', @@ -5162,6 +5255,7 @@ 'renderer', 'chrome_resources', 'chrome_strings', + 'syncapi', 'test_support_unit', '../printing/printing.gyp:printing', '../webkit/webkit.gyp:webkit', @@ -5245,6 +5339,7 @@ 'installer/installer.gyp:installer_util_strings', 'debugger', 'renderer', + 'syncapi', '../base/base.gyp:test_support_base', '../skia/skia.gyp:skia', '../testing/gtest.gyp:gtest', @@ -5342,6 +5437,7 @@ 'browser', 'debugger', 'renderer', + 'syncapi', '../base/base.gyp:base', '../skia/skia.gyp:skia', ], diff --git a/chrome/installer/mini_installer/chrome.release b/chrome/installer/mini_installer/chrome.release index d46c1200..cb675d7 100644 --- a/chrome/installer/mini_installer/chrome.release +++ b/chrome/installer/mini_installer/chrome.release @@ -41,6 +41,8 @@ Resources\Inspector\Images\*.*: %(VersionDir)s\Resources\Inspector\Images servers\*.dll: %(VersionDir)s\ Extensions\*.*: %(VersionDir)s\Extensions\ av*.dll: %(VersionDir)s\ +syncapi.dll: %(VersionDir)s\ [GOOGLE_CHROME] rlz.dll: %(VersionDir)s\ +pthreads.dll: %(VersionDir)s\ diff --git a/chrome/tools/build/win/FILES b/chrome/tools/build/win/FILES index e1d0e93..5b0f794 100644 --- a/chrome/tools/build/win/FILES +++ b/chrome/tools/build/win/FILES @@ -61,3 +61,6 @@ themes/default.dll resources rlz.dll wow_helper.exe +syncapi.dll
+pthreads.dll + |