diff --git a/patches/common/config.json b/patches/common/config.json index 978dbd663619..bfed6e8500a2 100644 --- a/patches/common/config.json +++ b/patches/common/config.json @@ -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" } diff --git a/patches/common/swiftshader/.patches b/patches/common/swiftshader/.patches new file mode 100644 index 000000000000..915dc191f21b --- /dev/null +++ b/patches/common/swiftshader/.patches @@ -0,0 +1 @@ +fix_arm64.patch diff --git a/patches/common/swiftshader/fix_arm64.patch b/patches/common/swiftshader/fix_arm64.patch new file mode 100644 index 000000000000..7867ee0515f1 --- /dev/null +++ b/patches/common/swiftshader/fix_arm64.patch @@ -0,0 +1,38 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Cheng Zhao +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",