Add patch for swiftshader ICF bug

This commit is contained in:
Kevin Sawicki 2017-07-19 08:31:18 -07:00 коммит произвёл Aleksei Kuzmin
Родитель c345f7e102
Коммит e557f5fc07
1 изменённых файлов: 26 добавлений и 0 удалений

26
patches/third_party/swiftshader/gold_ifc.patch поставляемый Normal file
Просмотреть файл

@ -0,0 +1,26 @@
diff --git a/BUILD.gn b/BUILD.gn
index bfd68e2b..6557d38a 100644
--- a/BUILD.gn
+++ b/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
@@ -88,6 +90,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",
+ ]
+ }
}
}
}