diff options
| author | ruki <[email protected]> | 2019-04-24 22:44:45 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-04-24 10:28:33 +0800 |
| commit | 2898840b2fee9a838ca84e1c0df129b00d81aa45 (patch) | |
| tree | fa89c51532de1ff5ff23e0a58258f856a5566566 /xmake/platforms/android | |
| parent | a4b4fff7cb09c6a8359bad4ee204559eb0e41c35 (diff) | |
improve cross compile for android
Diffstat (limited to 'xmake/platforms/android')
| -rw-r--r-- | xmake/platforms/android/config.lua | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/xmake/platforms/android/config.lua b/xmake/platforms/android/config.lua index fbc6ce7a7..92fa49d4c 100644 --- a/xmake/platforms/android/config.lua +++ b/xmake/platforms/android/config.lua @@ -56,12 +56,13 @@ function _toolchains() local sh = toolchain("the shared library linker") local ar = toolchain("the static library archiver") local ex = toolchain("the static library extractor") + local ranlib = toolchain("the static library index generator") local as = toolchain("the assember") local rc = toolchain("the rust compiler") local rc_ld = toolchain("the rust linker") local rc_sh = toolchain("the rust shared library linker") local rc_ar = toolchain("the rust static library archiver") - local toolchains = {cc = cc, cxx = cxx, as = as, ld = ld, sh = sh, ar = ar, ex = ex, + local toolchains = {cc = cc, cxx = cxx, as = as, ld = ld, sh = sh, ar = ar, ex = ex, ranlib = ranlib, rc = rc, ["rc-ld"] = rc_ld, ["rc-sh"] = rc_sh, ["rc-ar"] = rc_ar} -- init the c compiler @@ -89,6 +90,14 @@ function _toolchains() -- init the static library extractor ex:add({name = "ar", cross = cross}, "llvm-ar") + -- init the static library index generator + local gcc_toolchain_bin = nil + local gcc_toolchain = config.get("gcc_toolchain") + if gcc_toolchain then + gcc_toolchain_bin = path.join(gcc_toolchain, "bin") + end + ranlib:add({name = "ranlib", cross = cross, pathes = gcc_toolchain_bin}, "ranlib") + -- init the rust compiler and linker rc:add("$(env RC)", "rustc") rc_ld:add("$(env RC)", "rustc") |
