Skip to content

Commit d566969

Browse files
authored
build: remove patch in Android build
1 parent eca4b1a commit d566969

File tree

2 files changed

+7
-45
lines changed

2 files changed

+7
-45
lines changed

android-patches/trap-handler.h.patch

Lines changed: 0 additions & 26 deletions
This file was deleted.

android_configure.py

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,25 @@
22
import sys
33
import os
44

5-
# TODO: In next version, it will be a JSON file listing all the patches, and then it will iterate through to apply them.
6-
def patch_android():
7-
print("- Patches List -")
8-
print("[1] [deps/v8/src/trap-handler/trap-handler.h] related to https://github.com/nodejs/node/issues/36287")
9-
if platform.system() == "Linux":
10-
os.system('patch -f ./deps/v8/src/trap-handler/trap-handler.h < ./android-patches/trap-handler.h.patch')
11-
print("\033[92mInfo: \033[0m" + "Tried to patch.")
12-
135
if platform.system() == "Windows":
146
print("android-configure is not supported on Windows yet.")
157
sys.exit(1)
168

17-
if len(sys.argv) == 2 and sys.argv[1] == "patch":
18-
patch_android()
19-
sys.exit(0)
20-
21-
if len(sys.argv) != 4:
22-
print("Usage: ./android-configure [patch] <path to the Android NDK> <Android SDK version> <target architecture>")
9+
if len(sys.argv) != 2:
10+
print("Usage: ./android-configure <path to the Android NDK> <Android SDK version> <target architecture>")
2311
sys.exit(1)
2412

25-
if not os.path.exists(sys.argv[1]) or not os.listdir(sys.argv[1]):
13+
if not os.path.exists(sys.argv[0]) or not os.listdir(sys.argv[0]):
2614
print("\033[91mError: \033[0m" + "Invalid path to the Android NDK")
2715
sys.exit(1)
2816

29-
if int(sys.argv[2]) < 24:
17+
if int(sys.argv[1]) < 24:
3018
print("\033[91mError: \033[0m" + "Android SDK version must be at least 24 (Android 7.0)")
3119
sys.exit(1)
3220

33-
android_ndk_path = sys.argv[1]
34-
android_sdk_version = sys.argv[2]
35-
arch = sys.argv[3]
21+
android_ndk_path = sys.argv[0]
22+
android_sdk_version = sys.argv[1]
23+
arch = sys.argv[2]
3624

3725
if arch == "arm":
3826
DEST_CPU = "arm"

0 commit comments

Comments
 (0)