summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-12-27 23:44:22 +0800
committerruki <[email protected]>2024-12-27 16:26:42 +0800
commitb4d52bde5ff47bef46b0acc3e54227d9ef6877a1 (patch)
tree4d8989813a81ca27c999fd9594236c2e985738f0
parentb029e65edeb69f3ce0326a0a33c917a5080e6d7b (diff)
improve to fetch package for cross
-rw-r--r--xmake/modules/private/xrepo/action/fetch.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/modules/private/xrepo/action/fetch.lua b/xmake/modules/private/xrepo/action/fetch.lua
index 6fc25656c..eb5abfeba 100644
--- a/xmake/modules/private/xrepo/action/fetch.lua
+++ b/xmake/modules/private/xrepo/action/fetch.lua
@@ -42,6 +42,7 @@ function menu_options()
" - xrepo fetch --configs=\"regex=true,thread=true\" boost" },
{nil, "system", "k", "false", "Only fetch package on current system." },
{ },
+ {nil, "sdk", "kv", nil, "Set the SDK directory of cross toolchain." },
{nil, "toolchain", "kv", nil, "Set the toolchain name." },
{nil, "toolchain_host", "kv", nil, "Set the host toolchain name." },
{nil, "includes", "kv", nil, "Includes extra lua configuration files.",
@@ -136,6 +137,10 @@ function _fetch_packages(packages)
table.insert(config_argv, "-a")
table.insert(config_argv, option.get("arch"))
end
+ -- for cross toolchain
+ if option.get("sdk") then
+ table.insert(config_argv, "--sdk=" .. option.get("sdk"))
+ end
if option.get("toolchain") then
table.insert(config_argv, "--toolchain=" .. option.get("toolchain"))
end