Skip to content

Commit

Permalink
improve to fetch package for cross
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Dec 27, 2024
1 parent b029e65 commit b4d52bd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions xmake/modules/private/xrepo/action/fetch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b4d52bd

Please sign in to comment.