Set TargetMachine for libs too
In VS2013, remoting_host_event_logger.lib fails with: FAILED: E:\b\depot_tools\python_bin\python.exe gyp-win-tool link-wrapper environment.x86 lib.exe /nologo /ignore:4221 /OUT:obj\remoting\remoting_host_event_logger.lib @obj\remoting\remoting_host_event_logger.lib.rsp LINK : warning LNK4068: /MACHINE not specified; defaulting to X64 obj\remoting\host\remoting_host_event_logger.host_event_logger_win.obj : fatalerror LNK1112: module machine type 'X86' conflicts with target machine type 'x64' This is because if unspecified, lib.exe chooses the target architecture based on the first input file. In this lib, the first file (there's only 2) happens to be a .res compiled from a .rc, which doesn't have an architecture. Because we use the amd64 toolchain, lib decides to guess that it should use x64. This fails to lib because the other .cc input is x86. After adding support for setting the architecture for libs in gyp here https://codereview.chromium.org/68133006/ this sets it explicitly on our libs too. R=cpu@chromium.org BUG=309197 Review URL: https://codereview.chromium.org/61893020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234656 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@ -2577,6 +2577,9 @@
|
||||
'VCLinkerTool': {
|
||||
'TargetMachine': '1',
|
||||
},
|
||||
'VCLibrarianTool': {
|
||||
'TargetMachine': '1',
|
||||
},
|
||||
},
|
||||
'msvs_configuration_platform': 'Win32',
|
||||
},
|
||||
@ -2598,6 +2601,7 @@
|
||||
['<(windows_sdk_path)/Lib/win8/um/x86'],
|
||||
'AdditionalLibraryDirectories':
|
||||
['<(windows_sdk_path)/Lib/win8/um/x64'],
|
||||
'TargetMachine': '17', # x64
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user