Commit 53d2ef8b authored by Roger Tawa's avatar Roger Tawa Committed by Commit Bot

Fix for duplicate string resource error using link.exe.

The new linker reports fatal errors during the build on windows when
duplicate strings resources are defined.  Both installer_utils and gaiacp
use generate_embedded_i18n.gni to generate their strings which causes them
to use overlapping string resource IDs.  However, tests don't need to link
with gaiacp strings, so this CL reduces the test dependencies on gaiacp.

Add a dependency to installer/util:strings to tests that need it.

browser_tests, interactive_ui_tests, and related tests that use
ChromeTestLauncherDelegate need to have the installer's strings since
they adjust Windows firewall rules.

Bug: 958955
Change-Id: I51659aab3b79bda81d1583e7e75feaa11269d3b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1602732Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Reviewed-by: default avatarGreg Thompson <grt@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Commit-Queue: Roger Tawa <rogerta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659032}
parent e1ccb0aa
......@@ -3564,7 +3564,7 @@ jumbo_split_static_library("browser") {
"//chrome/chrome_watcher:client",
"//chrome/common:metrics_constants_util_win",
"//chrome/common:version_header",
"//chrome/credential_provider/gaiacp:common",
"//chrome/credential_provider/common:common_constants",
"//chrome/install_static:install_static_util",
"//chrome/notification_helper:constants",
"//chrome/services/util_win/public/mojom",
......
......@@ -27,7 +27,6 @@ source_set("common") {
"//base",
]
deps = [
":version",
"../gaiacp:common",
"//chrome/installer/util:with_no_strings",
]
......@@ -69,6 +68,7 @@ executable("gcp_setup") {
deps = [
":common",
":setup_resources",
":version",
"../eventlog:gcp_eventlog_messages",
"../gaiacp:common",
"//chrome/common:version_header",
......
......@@ -51,10 +51,4 @@ test("gcp_unittests") {
"//third_party/pywebsocket/src/mod_pywebsocket/",
"//third_party/tlslite/",
]
if (is_win) {
# TODO(https://crbug.com/958955): Fix dupes and remove this flag.
configs -= [ "//build/config/compiler:fatal_linker_warnings_win" ]
ldflags = [ "/FORCE:MultipleRes" ]
}
}
......@@ -432,6 +432,10 @@ static_library("browser_tests_runner") {
} else {
sources += [ "base/browser_tests_main.cc" ]
}
if (is_win) {
deps += [ "//chrome/installer/util:strings" ]
}
}
if (is_win) {
......@@ -4583,10 +4587,6 @@ test("unit_tests") {
"/DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll",
]
# TODO(https://crbug.com/958955): Fix dupes and remove this flag.
configs -= [ "//build/config/compiler:fatal_linker_warnings_win" ]
ldflags += [ "/FORCE:MultipleRes" ]
if (is_chrome_branded) {
sources += [
"../browser/conflicts/incompatible_applications_updater_win_unittest.cc",
......@@ -5347,6 +5347,7 @@ if (!is_android) {
"//chrome:other_version",
"//chrome/app:chrome_dll_resources",
"//chrome/install_static:install_static_util",
"//chrome/installer/util:strings",
"//third_party/isimpledom",
"//third_party/webrtc/modules/desktop_capture",
"//third_party/wtl",
......@@ -5812,10 +5813,6 @@ if (!is_android && !is_fuchsia) {
configs -= [ "//build/config/win:default_incremental_linking" ]
configs +=
[ "//build/config/win:default_large_module_incremental_linking" ]
# TODO(https://crbug.com/958955): Fix dupes and remove this flag.
configs -= [ "//build/config/compiler:fatal_linker_warnings_win" ]
ldflags = [ "/FORCE:MultipleRes" ]
} else {
sources -= [ "../app/chrome_version.rc.version" ]
}
......@@ -5984,6 +5981,7 @@ if (!is_android && !is_fuchsia) {
if (is_win) {
deps += [
"//chrome:other_version",
"//chrome/installer/util:strings",
"//third_party/webrtc/modules/desktop_capture",
"//third_party/wtl",
"//ui/resources",
......
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