Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addpatch: electron22 #2774

Merged
merged 1 commit into from
Jul 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- depot_tools/gclient.py.orig 2023-06-26 16:33:06.394443514 +0200
+++ depot_tools/gclient.py 2023-06-26 16:33:06.394443514 +0200
@@ -916,6 +916,9 @@
hooks_cwd = self.root.root_dir

for dep in deps_to_add:
+ if '${arch}' in dep.name or '${platform}' in dep.name:
+ print("WARN: ignoring platform-specific dep:", dep.name)
+ continue
if dep.verify_validity():
self.add_dependency(dep)
self._mark_as_parsed([
25 changes: 25 additions & 0 deletions electron22/electron22-grab-commit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from importlib.util import spec_from_loader, module_from_spec
from importlib.machinery import SourceFileLoader
import sys

spec = spec_from_loader("deps", SourceFileLoader("deps", sys.argv[2]))
deps = module_from_spec(spec)

# The DEPS file is not a standard python file
# Let's apply some hacks to trick the interpreter.
deps.Str = str
deps.Var = str

spec.loader.exec_module(deps)

if sys.argv[1] == 'infra':
# Return the commit of infra repo
infra_rev = deps.vars['luci_go']
print(infra_rev.split(':')[-1])
elif sys.argv[1] == 'luci_go':
# Return the commit of luci repo
luci_go_rev = deps.deps["infra/go/src/go.chromium.org/luci"]
print(luci_go_rev.split('@')[-1])
else:
print("Unsupported arguments!", file=sys.stderr)
sys.exit(-1)
27 changes: 27 additions & 0 deletions electron22/electron22-riscv-angle.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Index: src/third_party/angle/gni/angle.gni
===================================================================
--- src.orig/third_party/angle/gni/angle.gni
+++ src/third_party/angle/gni/angle.gni
@@ -91,7 +91,8 @@ declare_args() {

if (current_cpu == "arm64" || current_cpu == "x64" ||
current_cpu == "mips64el" || current_cpu == "s390x" ||
- current_cpu == "ppc64" || current_cpu == "loong64") {
+ current_cpu == "ppc64" || current_cpu == "loong64" ||
+ current_cpu == "riscv64") {
angle_64bit_current_cpu = true
} else if (current_cpu == "arm" || current_cpu == "x86" ||
current_cpu == "mipsel" || current_cpu == "s390" ||
Index: src/third_party/angle/src/common/platform.h
===================================================================
--- src.orig/third_party/angle/src/common/platform.h
+++ src/third_party/angle/src/common/platform.h
@@ -102,7 +102,7 @@
#endif

// Mips and arm devices need to include stddef for size_t.
-#if defined(__mips__) || defined(__arm__) || defined(__aarch64__)
+#if defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv)
# include <stddef.h>
#endif

Loading
Loading