Work around gold linker bug for 32-bit code.
Bug chromium:729532
Change-Id: Ie10edb39fdc61557f394cddca981f55e89b63cc4
Reviewed-on: https://swiftshader-review.googlesource.com/9950
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 694942a..b04b321 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -87,6 +87,12 @@
"-Wl,--hash-style=both",
"-Wl,--gc-sections",
]
+ # A bug in the gold linker prevents using ICF on 32-bit (crbug.com/729532)
+ if (use_gold && target_cpu == "x86") {
+ ldflags += [
+ "-Wl,--icf=none",
+ ]
+ }
}
}
}