backport patch to fix arm64 build of swiftshader

This commit is contained in:
Cheng Zhao 2019-01-17 09:41:24 +09:00 committed by Jeremy Apthorp
parent be69192a61
commit 3828e2a53a
3 changed files with 41 additions and 0 deletions

View file

@ -5,5 +5,7 @@
"src/electron/patches/common/ffmpeg": "src/third_party/ffmpeg",
"src/electron/patches/common/swiftshader": "src/third_party/swiftshader",
"src/electron/patches/common/v8": "src/v8"
}

View file

@ -0,0 +1 @@
fix_arm64.patch

View file

@ -0,0 +1,38 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Cheng Zhao <zcbenz@gmail.com>
Date: Thu Dec 6 02:00:06 2018 +0000
Backport fed67899a7b44c9409e94442eaca0deab2f809e3 to fix build on arm64.
https://swiftshader.googlesource.com/SwiftShader.git/+/fed67899a7b44c9409e94442eaca0deab2f809e3%5E%21/
Can be removed after updating to Chrome 73.
diff --git a/src/Reactor/BUILD.gn b/src/Reactor/BUILD.gn
index c983c4361..be5e5055d 100644
--- a/src/Reactor/BUILD.gn
+++ b/src/Reactor/BUILD.gn
@@ -170,6 +170,9 @@ config("swiftshader_reactor_private_config") {
]
} else {
cflags = [ "-Wno-unused-local-typedef" ]
+ if(target_cpu == "arm64") {
+ cflags += [ "-Wno-defaulted-function-deleted" ]
+ }
defines = [
"__STDC_CONSTANT_MACROS",
"__STDC_LIMIT_MACROS",
diff --git a/third_party/llvm-7.0/BUILD.gn b/third_party/llvm-7.0/BUILD.gn
index 4ccc6d15e..f0b3dc807 100644
--- a/third_party/llvm-7.0/BUILD.gn
+++ b/third_party/llvm-7.0/BUILD.gn
@@ -61,6 +61,10 @@ config("swiftshader_llvm_private_config") {
}
}
+ if(target_cpu == "arm64") {
+ cflags += [ "-Wno-defaulted-function-deleted" ]
+ }
+
cflags += [
"-Wno-attributes",
"-Wno-deprecated-declarations",