Revert "Disable incremental linking for some tools"
This reverts commit 1942fd8a7fe9fc609f51ef1fbff210ba5f356415.
Reason for revert: This was a hack that attempted to fix random link
failures. This hack ultimately didn't work because the crashes we
were seeing were due to a kernel bug, not a linker bug.
Original change's description:
> Disable incremental linking for some tools
>
> We occasionally get build crashes because binaries (usually protoc.exe,
> but others as well) are generated incorrectly. The symptom is that the
> incremental linking thunks contain all zeroes instead of a branch
> instruction, leading to crashes, usually access violations. This is
> presumed to be a bug in the MSVC++ incremental linker.
>
> This turns off incremental linking for four of the binaries that hit
> this issue most frequently, and some of their neighbors. These binaries
> are all small enough that incremental linking is not important so there
> is no real downside to making this change.
>
> Testing over the weekend shows that this error, or something very like
> it, can happen even with incremental linking disabled. I hope that this
> will reduce the frequency of the failures and there is no downside so
> I'm going to proceed and see if it helps.
>
> Bug: 644525
> Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet
> Change-Id: I0a9b33b0ad8335868e8e6f227f9a21e5ddeff6e4
> Reviewed-on: https://chromium-review.googlesource.com/777764
> Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
> Reviewed-by: John Abd-El-Malek <jam@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#517990}
TBR=jam@chromium.org,brucedawson@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: 644525
Change-Id: Ib822f0850cdffe7cdf0112aac5c45a2200b63adf
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet
Reviewed-on: https://chromium-review.googlesource.com/894448
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#533419}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7f063158562d2516620386721deb1339a3160e19
diff --git a/BUILD.gn b/BUILD.gn
index 843c2b5..e403dee 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -86,14 +86,6 @@
":yasm_config",
"//build/config/compiler:no_chromium_code",
]
-
- if (is_win) {
- # Work around incremental linking randomly creating corrupt binaries,
- # crbug.com/644525.
- configs -= [ "//build/config/win:default_incremental_linking" ]
- configs += [ "//build/config/win:no_incremental_linking" ]
- }
-
deps = [
"//build/config:exe_and_shlib_deps",
@@ -111,14 +103,6 @@
":yasm_config",
"//build/config/compiler:no_chromium_code",
]
-
- if (is_win) {
- # Work around incremental linking randomly creating corrupt binaries,
- # crbug.com/644525.
- configs -= [ "//build/config/win:default_incremental_linking" ]
- configs += [ "//build/config/win:no_incremental_linking" ]
- }
-
deps = [
"//build/config:exe_and_shlib_deps",
@@ -139,13 +123,6 @@
"//build/config/compiler:no_chromium_code",
]
- if (is_win) {
- # Work around incremental linking randomly creating corrupt binaries,
- # crbug.com/644525.
- configs -= [ "//build/config/win:default_incremental_linking" ]
- configs += [ "//build/config/win:no_incremental_linking" ]
- }
-
# Must be compatible with yasm_utils/yasm
configs -= configs_to_delete
configs += configs_to_add
@@ -187,14 +164,6 @@
":yasm_config",
"//build/config/compiler:no_chromium_code",
]
-
- if (is_win) {
- # Work around incremental linking randomly creating corrupt binaries,
- # crbug.com/644525.
- configs -= [ "//build/config/win:default_incremental_linking" ]
- configs += [ "//build/config/win:no_incremental_linking" ]
- }
-
deps = [
"//build/config:exe_and_shlib_deps",
@@ -212,14 +181,6 @@
":yasm_config",
"//build/config/compiler:no_chromium_code",
]
-
- if (is_win) {
- # Work around incremental linking randomly creating corrupt binaries,
- # crbug.com/644525.
- configs -= [ "//build/config/win:default_incremental_linking" ]
- configs += [ "//build/config/win:no_incremental_linking" ]
- }
-
deps = [
"//build/config:exe_and_shlib_deps",
@@ -264,14 +225,6 @@
# correctly.
":re2c_warnings",
]
-
- if (is_win) {
- # Work around incremental linking randomly creating corrupt binaries,
- # crbug.com/644525.
- configs -= [ "//build/config/win:default_incremental_linking" ]
- configs += [ "//build/config/win:no_incremental_linking" ]
- }
-
deps = [
"//build/config:exe_and_shlib_deps",
@@ -391,13 +344,6 @@
":yasm_warnings",
]
- if (is_win) {
- # Work around incremental linking randomly creating corrupt binaries,
- # crbug.com/644525.
- configs -= [ "//build/config/win:default_incremental_linking" ]
- configs += [ "//build/config/win:no_incremental_linking" ]
- }
-
# Disable WPO for yasm: crbug.com/604808
if (is_official_build && full_wpo_on_official) {
configs -= [ "//build/config/compiler:default_optimization" ]