diff options
| author | ruki <[email protected]> | 2024-01-23 23:00:29 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-01-25 12:09:58 +0800 |
| commit | eeb0f80823bfd4fdd45a9d9a4eede7f407905fea (patch) | |
| tree | 851062ff26866c7d9a911ad5ae91b6979d185438 /xmake/toolchains/ndk/load.lua | |
| parent | 229bccd5eeca9fb6da8b93c76d0d13f9c2b85314 (diff) | |
remove toolchain runtimes
Diffstat (limited to 'xmake/toolchains/ndk/load.lua')
| -rw-r--r-- | xmake/toolchains/ndk/load.lua | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/xmake/toolchains/ndk/load.lua b/xmake/toolchains/ndk/load.lua index b9e06c8dd..896e4b837 100644 --- a/xmake/toolchains/ndk/load.lua +++ b/xmake/toolchains/ndk/load.lua @@ -19,6 +19,7 @@ -- -- imports +import("core.base.hashset") import("core.project.config") -- get triple @@ -207,8 +208,17 @@ function main(toolchain) -- get c++ stl sdk directory local cxxstl_sdkdir = nil - local ndk_cxxstl = toolchain:runtimes() or config.get("ndk_cxxstl") + local ndk_cxxstl = config.get("runtimes") or config.get("ndk_cxxstl") if ndk_cxxstl then + if ndk_cxxstl:find(",", 1, true) then + local runtimes_supported = hashset.from(toolchain:get("runtimes")) + for _, item in ipairs(ndk_cxxstl:split(",")) do + if runtimes_supported:has(item) then + ndk_cxxstl = item + break + end + end + end -- we uses c++_static/c++_shared instead of llvmstl_static/llvmstl_shared if ndk_cxxstl:startswith("c++") or ndk_cxxstl:startswith("llvmstl") then cxxstl_sdkdir = cxxstl_sdkdir_llvmstl |
