Commit d2d03fc5 authored by Xiaohan Wang's avatar Xiaohan Wang Committed by Commit Bot

Add comsuppw.lib for BrowserDMTokenStorageWin

File chrome\browser\policy\browser_dm_token_storage_win.cc includes
comutil.h for _variant_t but doesn't add comsuppw.lib which is required
according to MSDN:
https://docs.microsoft.com/en-us/cpp/cpp/variant-t-class?view=vs-2019

Without this change, we'll get a linking error as follows:

[2773/2779] LINK(DLL) chrome.dll chrome.dll.lib chrome.dll.pdb

FAILED: chrome.dll chrome.dll.lib chrome.dll.pdb
...
lld-link: error: undefined symbol:
wchar_t * __cdecl _com_util::ConvertStringToBSTR(char const *)
>>> referenced by .\..\..\third_party\depot_tools\win_toolchain\
    vs_files\<...>\include\comutil.h:1294
>>> obj/chrome/browser\browser/browser_dm_token_storage_win.obj:
    (public: __cdecl _variant_t::_variant_t(char const *))

Bug: 1068627
Change-Id: Iec1c323fca3664b8310e31c622e4d145bc7bc37f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2140192
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: default avatarOwen Min <zmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#757116}
parent fd861686
......@@ -2292,7 +2292,12 @@ jumbo_static_library("browser") {
]
if (is_win) {
libs += [ "secur32.lib" ]
libs += [
"secur32.lib",
# Needed for _variant_t used in browser_dm_token_storage_win.cc
"comsuppw.lib",
]
sources +=
[ "component_updater/recovery_improved_component_installer_win.cc" ]
deps += [ "//chrome/elevation_service:elevation_service_idl" ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment