diff options
| author | Chen Yufei <[email protected]> | 2022-01-20 13:30:19 +0800 |
|---|---|---|
| committer | Chen Yufei <[email protected]> | 2022-01-20 13:31:07 +0800 |
| commit | f6046023e01cf2cdf23ced5044752515f5170982 (patch) | |
| tree | d5ba0342e0a1088c4c174a32a0bd418ef7f82520 | |
| parent | 881cea9d69381c34e020d4d9f36dc53b0a2c7181 (diff) | |
xrepo: fetch add toolchain option.
| -rw-r--r-- | xmake/modules/private/xrepo/action/fetch.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xmake/modules/private/xrepo/action/fetch.lua b/xmake/modules/private/xrepo/action/fetch.lua index d94d0d215..61131863d 100644 --- a/xmake/modules/private/xrepo/action/fetch.lua +++ b/xmake/modules/private/xrepo/action/fetch.lua @@ -41,6 +41,7 @@ function menu_options() " - xrepo fetch --configs=\"vs_runtime='MD'\" zlib", " - xrepo fetch --configs=\"regex=true,thread=true\" boost"}, {}, + {nil, "toolchain", "kv", nil, "Set the toolchain name." }, {nil, "deps", "k", nil, "Fetch packages with dependencies." }, {nil, "cflags", "k", nil, "Fetch cflags of the given packages." }, {nil, "ldflags", "k", nil, "Fetch ldflags of the given packages."}, @@ -104,6 +105,9 @@ function _fetch_packages(packages) table.insert(config_argv, "-a") table.insert(config_argv, option.get("arch")) end + if option.get("toolchain") then + table.insert(config_argv, "--toolchain=" .. option.get("toolchain")) + end local mode = option.get("mode") if mode then table.insert(config_argv, "-m") |
