Skip to content

Commit

Permalink
android: support native addons that need ranlib path (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
okhiroyuki authored Oct 28, 2023
1 parent d36fa88 commit 5fcc798
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ cdvPluginPostBuildExtras += { ->
String npm_toolchain_cc = "${toolchain_path}/bin/${temp_compiler_prefix}-clang"
String npm_toolchain_cxx = "${toolchain_path}/bin/${temp_compiler_prefix}-clang++"
String npm_toolchain_link = "${toolchain_path}/bin/${temp_compiler_prefix}-clang++"
String npm_toolchain_ranlib = "${toolchain_path}/bin/llvm-ranlib"
String cargo_target_triple = cargo_build_target.toUpperCase().replaceAll('-', '_')

String npm_gyp_defines = "target_arch=${temp_arch}"
Expand Down Expand Up @@ -260,6 +261,7 @@ cdvPluginPostBuildExtras += { ->
environment ('CC', "${npm_toolchain_cc}")
environment ('CXX', "${npm_toolchain_cxx}")
environment ('LINK', "${npm_toolchain_link}")
environment ('RANLIB', "${npm_toolchain_ranlib}")
environment ('GYP_DEFINES', "${npm_gyp_defines}")

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

0 comments on commit 5fcc798

Please sign in to comment.