summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-01-20 00:57:59 +0800
committerruki <[email protected]>2024-01-25 12:09:58 +0800
commitde227a41eaa079f4ee3c725922495f8ce0f96833 (patch)
tree1e6e3ad9b8069c1d23e51d8639075fb373ef30f3
parent21aeb8d32ec1892904cc34a57e9c2c3d83b9f1bd (diff)
add runtimes option
-rw-r--r--xmake/actions/config/xmake.lua7
-rw-r--r--xmake/platforms/android/xmake.lua2
-rw-r--r--xmake/platforms/windows/xmake.lua2
3 files changed, 9 insertions, 2 deletions
diff --git a/xmake/actions/config/xmake.lua b/xmake/actions/config/xmake.lua
index 464afa662..48bcb6eef 100644
--- a/xmake/actions/config/xmake.lua
+++ b/xmake/actions/config/xmake.lua
@@ -213,6 +213,13 @@ task("config")
, " - xmake f --toolchain=[cross|llvm|sdcc ..] --sdk=/xxx"
, " - run `xmake show -l toolchains` to get all toolchains"
, values = _toolchain_values},
+ {nil, "runtimes", "kv", nil, "Set the compiler runtime library."
+ , "e.g. "
+ , " - xmake f --runtimes=MTd"
+ , " - xmake f --runtimes=MT,c++_static"
+ , values = {"MT", "MTd", "MD", "MDd", -- only for msvc
+ "c++_static", "c++_shared", -- gcc/clang
+ "stdc++_static", "stdc++_shared"}}, -- gcc/clang
_language_menu_options,
_platform_menu_options,
{category = "Other Configuration"},
diff --git a/xmake/platforms/android/xmake.lua b/xmake/platforms/android/xmake.lua
index 48f1463e1..4199dbcc6 100644
--- a/xmake/platforms/android/xmake.lua
+++ b/xmake/platforms/android/xmake.lua
@@ -47,7 +47,7 @@ platform("android")
, {nil, "android_sdk", "kv", nil, "The Android SDK Directory" }
, {nil, "build_toolver", "kv", nil, "The Build Tool Version of Android SDK" }
, {nil, "ndk_stdcxx", "kv", true, "Use stdc++ library for NDK" }
- , {nil, "ndk_cxxstl", "kv", nil, "The stdc++ stl library for NDK",
+ , {nil, "ndk_cxxstl", "kv", nil, "The stdc++ stl library for NDK, (deprecated, please use --runtimes)",
" - c++_static",
" - c++_shared",
" - gnustl_static",
diff --git a/xmake/platforms/windows/xmake.lua b/xmake/platforms/windows/xmake.lua
index 84160b818..14ada8784 100644
--- a/xmake/platforms/windows/xmake.lua
+++ b/xmake/platforms/windows/xmake.lua
@@ -41,7 +41,7 @@ platform("windows")
, " e.g. --vs_toolset=14.0" }
, {nil, "vs_sdkver", "kv", nil, "The Windows SDK Version of Visual Studio"
, " e.g. --vs_sdkver=10.0.15063.0" }
- , {nil, "vs_runtime", "kv", nil, "The Runtime library of Visual Studio"
+ , {nil, "vs_runtime", "kv", nil, "The Runtime library of Visual Studio (deprecated, please use --runtimes)"
, values = {"MT", "MTd", "MD", "MDd"} }
, {category = "Cuda SDK Configuration" }
, {nil, "cuda", "kv", "auto", "The Cuda SDK Directory" }