diff options
| author | ruki <[email protected]> | 2026-03-17 00:02:11 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-03-17 00:02:11 +0800 |
| commit | b4a1c11be9dac3472299aba9165b4b182dcdc8c1 (patch) | |
| tree | 660439c4adceab3707ade8102bca039ad8732094 | |
| parent | 0f22c796d88325884e568fbe5a559323ba862fe9 (diff) | |
remove unused codes
| -rw-r--r-- | xmake/rules/csharp/modules/csharp_utils.lua | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/xmake/rules/csharp/modules/csharp_utils.lua b/xmake/rules/csharp/modules/csharp_utils.lua index 404be965d..78837cff9 100644 --- a/xmake/rules/csharp/modules/csharp_utils.lua +++ b/xmake/rules/csharp/modules/csharp_utils.lua @@ -19,7 +19,6 @@ -- -- imports -import("core.base.option") import("core.project.config") import("csproj_generator", {alias = "generate_csproj"}) @@ -43,22 +42,6 @@ function _generated_csproj_path(target) return path.join(csprojdir, csprojname) end -function _map_rid_arch(arch) - arch = (arch or ""):lower() - if arch == "x64" or arch == "x86_64" or arch == "amd64" then - return "x64" - elseif arch == "x86" or arch == "i386" then - return "x86" - elseif arch == "arm64" then - return "arm64" - elseif arch == "arm" or arch == "armv7" then - return "arm" - elseif arch == "riscv64" then - return "riscv64" - end - return nil -end - function generate_csproj_file(target) if not _is_csharp_target(target) then return nil @@ -69,48 +52,3 @@ function generate_csproj_file(target) return csprojfile end -function build_mode_to_configuration() - local mode - if type(get_config) == "function" then - mode = get_config("mode") - end - if not mode and type(is_mode) == "function" then - if is_mode("debug") then - mode = "debug" - elseif is_mode("release") then - mode = "release" - end - end - mode = mode or "release" - local mode_lower = mode:lower() - if mode_lower == "debug" then - return "Debug" - elseif mode_lower == "release" then - return "Release" - end - return mode:sub(1, 1):upper() .. mode:sub(2) -end - -function get_runtime_identifier(target) - local rid = target:values("csharp.runtime_identifier") - if type(rid) == "table" then - rid = rid[1] - end - if rid and #rid > 0 then - return rid - end - local arch = _map_rid_arch(target:arch()) - if not arch then - return nil - end - local plat = target:plat() - if plat == "windows" or plat == "mingw" or plat == "msys" or plat == "cygwin" then - return "win-" .. arch - elseif plat == "linux" then - return "linux-" .. arch - elseif plat == "macosx" then - return "osx-" .. arch - end - return nil -end - |
