Skip to content

Commit bf3cd63

Browse files
author
sally-sim
committed
Change to using unwind library instead of gcc library.
1 parent b1b5c48 commit bf3cd63

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

plugin/src/main/resources/com/nishtahir/linker-wrapper.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77

88
args = [os.environ['RUST_ANDROID_GRADLE_CC'], os.environ['RUST_ANDROID_GRADLE_CC_LINK_ARG']] + sys.argv[1:]
99

10-
# The gcc library is not included in ndk version 23.
11-
if 23 == int(os.environ['CARGO_NDK_MAJOR_VERSION']):
12-
args.remove("-lgcc")
10+
# The gcc library is not included starting from ndk version 23.
11+
ndk_major_version = os.environ['CARGO_NDK_MAJOR_VERSION']
12+
if ndk_major_version.isdigit():
13+
if 23 <= int(ndk_major_version):
14+
args.remove("-lgcc")
15+
args.append("-lunwind")
1316

1417
# This only appears when the subprocess call fails, but it's helpful then.
1518
printable_cmd = ' '.join(pipes.quote(arg) for arg in args)

0 commit comments

Comments
 (0)