Skip to content

Commit

Permalink
Add Linux arm64 support and disable sandbox and verification checks
Browse files Browse the repository at this point in the history
  • Loading branch information
trheyi committed Dec 24, 2023
1 parent 791bc23 commit 5c0e260
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
14 changes: 14 additions & 0 deletions deps/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
v8_path = os.path.join(deps_path, "v8")
tools_path = os.path.join(deps_path, "depot_tools")
is_windows = platform.system().lower() == "windows"
is_linux = platform.system().lower() == "linux"

gclient_sln = [
{ "name" : "v8",
Expand Down Expand Up @@ -68,6 +69,11 @@
icu_use_data_file=false
v8_enable_test_features=false
exclude_unwind_tables=true
v8_enable_sandbox=false
v8_enable_v8_checks=false
v8_enable_trace_maps=false
v8_enable_object_print=false
v8_enable_verify_heap=false
"""

def v8deps():
Expand All @@ -77,6 +83,14 @@ def v8deps():
subprocess.check_call(cmd(["gclient", "sync", "--spec", spec]),
cwd=deps_path,
env=env)
# if arch is arm64 and os is linux apply patch
# fix aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mmark-bti-property’
if args.arch == "arm64" and is_linux:
patch_script_path = "./patch.sh"
subprocess.check_call(cmd([patch_script_path]),
cwd=deps_path,
env=env)


def cmd(args):
return ["cmd", "/c"] + args if is_windows else args
Expand Down
6 changes: 6 additions & 0 deletions deps/patch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
file_path="./v8/third_party/icu/BUILD.gn"
replace_str="\"standard__\""
sed -i "s/\"standard\"/$replace_str/" $file_path
rm -rf "./v8/third_party/icu/.git/"
echo "Patch icu success"

0 comments on commit 5c0e260

Please sign in to comment.