File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,10 @@ open class CargoBuildTask : DefaultTask() {
167
167
if (toolchain.type != ToolchainType .DESKTOP ) {
168
168
val toolchainDirectory = if (toolchain.type == ToolchainType .ANDROID_PREBUILT ) {
169
169
val ndkPath = app.ndkDirectory
170
+ val ndkVersion = ndkPath.name
171
+ val ndkVersionMajor = ndkVersion.split(" ." ).first()
172
+ environment(" CARGO_NDK_MAJOR_VERSION" , ndkVersionMajor)
173
+
170
174
val hostTag = if (Os .isFamily(Os .FAMILY_WINDOWS )) {
171
175
if (Os .isArch(" x86_64" ) || Os .isArch(" amd64" )) {
172
176
" windows-x86_64"
Original file line number Diff line number Diff line change 7
7
8
8
args = [os .environ ['RUST_ANDROID_GRADLE_CC' ], os .environ ['RUST_ANDROID_GRADLE_CC_LINK_ARG' ]] + sys .argv [1 :]
9
9
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" )
13
+
10
14
# This only appears when the subprocess call fails, but it's helpful then.
11
15
printable_cmd = ' ' .join (pipes .quote (arg ) for arg in args )
12
16
print (printable_cmd )
You can’t perform that action at this time.
0 commit comments