OSDN Git Service

Work around gold linker bug for 32-bit code.
authorNicolas Capens <capn@google.com>
Mon, 5 Jun 2017 17:24:09 +0000 (13:24 -0400)
committerNicolas Capens <capn@google.com>
Mon, 5 Jun 2017 17:31:24 +0000 (17:31 +0000)
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>
BUILD.gn

index 694942a..b04b321 100644 (file)
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -87,6 +87,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",
+        ]
+      }
     }
   }
 }