Linux: Work around gold linker bug for 32-bit code.
This commit is contained in:
parent
8c8deea63a
commit
f69054f2da
|
@ -316,4 +316,10 @@ patches = [
|
|||
# https://chromium-review.googlesource.com/c/590271/
|
||||
'name': 'linux_build',
|
||||
},
|
||||
{
|
||||
# Linux: Work around gold linker bug for 32-bit code.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=729532
|
||||
'name': 'swiftshader_729532',
|
||||
'path': 'third_party/swiftshader/',
|
||||
},
|
||||
]
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
diff --git BUILD.gn BUILD.gn
|
||||
index 694942a..52a78e8 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -12,6 +12,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
+import("//build/config/compiler/compiler.gni")
|
||||
+
|
||||
config("swiftshader_config") {
|
||||
defines = [ "STRICT_CONFORMANCE" ] # Disables OpenGL ES 3.0
|
||||
|
||||
@@ -87,6 +89,12 @@ config("swiftshader_config") {
|
||||
"-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",
|
||||
+ ]
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue