Skip to content

Commit

Permalink
Allow Win64 build of base library even in a Win32 build.
Browse files Browse the repository at this point in the history
Some components of a 32 bit build of chrome for Windows need to be built
as Win64 Dlls.  To allow those components to use base, we make a Win64
build of the base library even when building chrome 32 bit.

This is needed by the Chrome Desk Band code. crbug.com/327435.
https://codereview.chromium.org/79173004/

BUG=327435

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243936 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
petewil@chromium.org committed Jan 9, 2014
1 parent 140cc3f commit ef1af5c
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 21 deletions.
46 changes: 40 additions & 6 deletions base/base.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1015,15 +1015,18 @@
}],
['OS == "win" and target_arch=="ia32"', {
'targets': [
# The base_win64 target here allows us to use base for Win64 targets
# (the normal build is 32 bits).
{
'target_name': 'base_nacl_win64',
'target_name': 'base_win64',
'type': '<(component)',
'variables': {
'base_target': 1,
},
'dependencies': [
'base_static_win64',
'allocator/allocator.gyp:allocator_extension_thunks_win64',
'../third_party/modp_b64/modp_b64.gyp:modp_b64_win64',
'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
],
# TODO(gregoryd): direct_dependent_settings should be shared with the
Expand All @@ -1034,12 +1037,9 @@
],
},
'defines': [
'BASE_WIN64',
'<@(nacl_win64_defines)',
],
'sources!': [
# base64.cc depends on modp_b64.
'base64.cc',
],
'configurations': {
'Common_Base': {
'msvs_target_platform': 'x64',
Expand All @@ -1052,6 +1052,40 @@
],
}],
],
# TODO(rvargas): Bug 78117. Remove this.
'msvs_disabled_warnings': [
4244,
4996,
4267,
],
'sources': [
'third_party/nspr/prcpucfg.h',
'third_party/nspr/prcpucfg_win.h',
'third_party/nspr/prtypes.h',
'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
'async_socket_io_handler.h',
'async_socket_io_handler_posix.cc',
'async_socket_io_handler_win.cc',
'auto_reset.h',
'event_recorder.h',
'event_recorder_stubs.cc',
'event_recorder_win.cc',
'linux_util.cc',
'linux_util.h',
'md5.cc',
'md5.h',
'message_loop/message_pump_observer.h',
'message_loop/message_pump_libevent.cc',
'message_loop/message_pump_libevent.h',
'metrics/field_trial.cc',
'metrics/field_trial.h',
'posix/file_descriptor_shuffle.cc',
'posix/file_descriptor_shuffle.h',
'sync_socket.h',
'sync_socket_win.cc',
'sync_socket_posix.cc',
],
},
{
'target_name': 'base_i18n_nacl_win64',
Expand Down Expand Up @@ -1103,7 +1137,7 @@
},
},
'defines': [
'NACL_WIN64',
'<@(nacl_win64_defines)',
],
# TODO(rvargas): Bug 78117. Remove this.
'msvs_disabled_warnings': [
Expand Down
2 changes: 1 addition & 1 deletion chrome/chrome_exe.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@
'chrome_version_resources',
'installer_util_nacl_win64',
'../base/base.gyp:base_i18n_nacl_win64',
'../base/base.gyp:base_nacl_win64',
'../base/base.gyp:base_win64',
'../base/base.gyp:base_static_win64',
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
'../breakpad/breakpad.gyp:breakpad_handler_win64',
Expand Down
2 changes: 1 addition & 1 deletion chrome/chrome_installer.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@
'<@(nacl_win64_defines)',
],
'dependencies': [
'<(DEPTH)/base/base.gyp:base_nacl_win64',
'<(DEPTH)/base/base.gyp:base_win64',
],
'configurations': {
'Common_Base': {
Expand Down
2 changes: 1 addition & 1 deletion chrome/common_constants.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
'<(SHARED_INTERMEDIATE_DIR)', # Needed by chrome_paths.cc.
],
'dependencies': [
'../base/base.gyp:base_nacl_win64',
'../base/base.gyp:base_win64',
'../components/nacl.gyp:nacl_switches_win64',
'../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
],
Expand Down
2 changes: 1 addition & 1 deletion cloud_print/virtual_driver/win/virtual_driver64.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
'<@(nacl_win64_defines)',
],
'dependencies': [
'<(DEPTH)/base/base.gyp:base_nacl_win64',
'<(DEPTH)/base/base.gyp:base_win64',
'<(DEPTH)/chrome/chrome.gyp:launcher_support64',
'<(DEPTH)/chrome/common_constants.gyp:common_constants_win64',
],
Expand Down
4 changes: 2 additions & 2 deletions components/breakpad.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
'COMPILE_CONTENT_STATICALLY',
],
'dependencies': [
'../base/base.gyp:base_nacl_win64',
'../base/base.gyp:base_win64',
'../breakpad/breakpad.gyp:breakpad_handler_win64',
'../breakpad/breakpad.gyp:breakpad_sender_win64',
'../sandbox/sandbox.gyp:sandbox_win64',
Expand All @@ -120,7 +120,7 @@
'target_name': 'breakpad_crash_service_win64',
'type': 'static_library',
'dependencies': [
'../base/base.gyp:base_nacl_win64',
'../base/base.gyp:base_win64',
'../breakpad/breakpad.gyp:breakpad_handler_win64',
'../breakpad/breakpad.gyp:breakpad_sender_win64',
],
Expand Down
4 changes: 2 additions & 2 deletions courgette/courgette.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
'target_name': 'courgette_lib64',
'type': 'static_library',
'dependencies': [
'../base/base.gyp:base_nacl_win64',
'../base/base.gyp:base_win64',
'../third_party/lzma_sdk/lzma_sdk.gyp:lzma_sdk64',
],
'sources': [
Expand All @@ -196,7 +196,7 @@
],
'dependencies': [
'courgette_lib64',
'../base/base.gyp:base_nacl_win64',
'../base/base.gyp:base_win64',
],
'configurations': {
'Common_Base': {
Expand Down
2 changes: 1 addition & 1 deletion crypto/crypto.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@
# for the helper.
'type': '<(component)',
'dependencies': [
'../base/base.gyp:base_nacl_win64',
'../base/base.gyp:base_win64',
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
],
'sources': [
Expand Down
2 changes: 1 addition & 1 deletion gpu/gpu.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@
'gpu_ipc.gypi',
],
'dependencies': [
'../base/base.gyp:base_nacl_win64',
'../base/base.gyp:base_win64',
'../ipc/ipc.gyp:ipc_win64',
],
'defines': [
Expand Down
2 changes: 1 addition & 1 deletion ipc/ipc.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
'ipc_target': 1,
},
'dependencies': [
'../base/base.gyp:base_nacl_win64',
'../base/base.gyp:base_win64',
# TODO(viettrungluu): Needed for base/lazy_instance.h, which is
# suspect.
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
Expand Down
6 changes: 3 additions & 3 deletions ppapi/ppapi_internal.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,15 @@
},
'dependencies': [
'ppapi.gyp:ppapi_c',
'../base/base.gyp:base_nacl_win64',
'../base/base.gyp:base_win64',
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
'../ipc/ipc.gyp:ipc_win64',
],
'defines': [
'<@(nacl_win64_defines)',
],
'export_dependent_settings': [
'../base/base.gyp:base_nacl_win64',
'../base/base.gyp:base_win64',
],
'configurations': {
'Common_Base': {
Expand All @@ -248,7 +248,7 @@
'ppapi_ipc_target': 1,
},
'dependencies': [
'../base/base.gyp:base_nacl_win64',
'../base/base.gyp:base_win64',
'../ipc/ipc.gyp:ipc_win64',
'../gpu/gpu.gyp:gpu_ipc_win64',
'ppapi.gyp:ppapi_c',
Expand Down
2 changes: 1 addition & 1 deletion sandbox/win/sandbox_win.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@
'target_arch': 'x64',
},
'dependencies': [
'../base/base.gyp:base_nacl_win64',
'../base/base.gyp:base_win64',
'../base/base.gyp:base_static_win64',
],
'configurations': {
Expand Down
27 changes: 27 additions & 0 deletions third_party/modp_b64/modp_b64.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,31 @@
],
},
],
'conditions': [
['OS == "win" and target_arch=="ia32"', {
# Even if we are building the browser for Win32, we need a few modules
# to be built for Win64, and this is a prerequsite.
'targets': [
{
'target_name': 'modp_b64_win64',
'type': 'static_library',
# We can't use dynamic_annotations target for win64 build since it is
# a 32-bit library.
'include_dirs': [
'../..',
],
'sources': [
'modp_b64.cc',
'modp_b64.h',
'modp_b64_data.h',
],
'configurations': {
'Common_Base': {
'msvs_target_platform': 'x64',
},
},
},
],
}],
],
}

0 comments on commit ef1af5c

Please sign in to comment.