Skip to content

Commit 55e0747

Browse files
committed
android: support native addons that need ranlib path
1 parent b84b65b commit 55e0747

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

android/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ if ("1".equals(shouldRebuildNativeModules)) {
306306
String npm_toolchain_cc = "${toolchain_path}/bin/${temp_compiler_prefix}-clang"
307307
String npm_toolchain_cxx = "${toolchain_path}/bin/${temp_compiler_prefix}-clang++"
308308
String npm_toolchain_link = "${toolchain_path}/bin/${temp_compiler_prefix}-clang++"
309+
String npm_toolchain_ranlib = "${toolchain_path}/bin/llvm-ranlib"
309310
String cargo_target_triple = cargo_build_target.toUpperCase().replaceAll('-', '_')
310311

311312
String npm_gyp_defines = "target_arch=${temp_arch}"
@@ -448,6 +449,7 @@ if ("1".equals(shouldRebuildNativeModules)) {
448449
environment ('CC', "${npm_toolchain_cc}")
449450
environment ('CXX', "${npm_toolchain_cxx}")
450451
environment ('LINK', "${npm_toolchain_link}")
452+
environment ('RANLIB', "${npm_toolchain_ranlib}")
451453
environment ('GYP_DEFINES', "${npm_gyp_defines}")
452454

453455
commandLine npmCommandName, '--verbose', '--foreground-scripts', 'rebuild', '--build-from-source'

0 commit comments

Comments
 (0)