diff options
Diffstat (limited to 'xmake')
| -rw-r--r-- | xmake/core/project/policy.lua | 4 | ||||
| -rw-r--r-- | xmake/rules/c++/config/dynamic_debugging.lua | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/xmake/core/project/policy.lua b/xmake/core/project/policy.lua index 63d51f9f2..1cecfd01a 100644 --- a/xmake/core/project/policy.lua +++ b/xmake/core/project/policy.lua @@ -108,8 +108,8 @@ function policy.policies() ["build.c++.gcc.modules.cxx11abi"] = {description = "Force to enable new cxx11 abi in C++ modules for gcc. (deprecated)", type = "boolean"}, -- Set the default vs runtime, e.g. MT, MD ["build.c++.msvc.runtime"] = {description = "Set the default vs runtime.", type = "string", values = {"MT", "MD"}}, - -- Enable C++ Dynamic Debugging for MSVC (requires MSVC 19.44+, x64 only, incompatible with LTCG/PGO/OPT-ICF). - ["build.c++.dynamic_debugging"] = {description = "Enable C++ Dynamic Debugging for MSVC (requires MSVC 19.44+, x64 only, incompatible with LTCG/PGO/OPT-ICF).", type = "boolean"}, + -- Enable C++ Dynamic Debugging for MSVC (requires MSVC toolset 14.44+, x64 only, incompatible with LTCG/PGO/OPT-ICF). + ["build.c++.dynamic_debugging"] = {description = "Enable C++ Dynamic Debugging for MSVC (requires MSVC toolset 14.44+, x64 only, incompatible with LTCG/PGO/OPT-ICF).", type = "boolean"}, -- Enable cuda device link ["build.cuda.devlink"] = {description = "Enable Cuda devlink.", type = "boolean"}, -- Enable linker output, e.g. show -Wl,--print-memory-usage output for gcc/g++ diff --git a/xmake/rules/c++/config/dynamic_debugging.lua b/xmake/rules/c++/config/dynamic_debugging.lua index e201bfe8a..fcc496ce6 100644 --- a/xmake/rules/c++/config/dynamic_debugging.lua +++ b/xmake/rules/c++/config/dynamic_debugging.lua @@ -17,7 +17,6 @@ -- @author ruki -- @file dynamic_debugging.lua -- --- @see https://devblogs.microsoft.com/cppblog/cpp-dynamic-debugging-full-debuggability-for-optimized-builds/ -- imports import("core.project.project") @@ -25,6 +24,8 @@ import("core.tool.toolchain") import("core.base.semver") -- add dynamic debugging support +-- @see https://devblogs.microsoft.com/cppblog/cpp-dynamic-debugging-full-debuggability-for-optimized-builds/ +-- https://github.com/xmake-io/xmake/issues/6258 function main(target, sourcekind) -- check if dynamic debugging is enabled local enabled = target:policy("build.c++.dynamic_debugging") @@ -51,7 +52,7 @@ function main(target, sourcekind) return end - -- check MSVC version (requires 19.44+) + -- check MSVC version (requires Visual Studio 2022 Version 17.14 Preview 2+, toolset 14.44+) local msvc = target:toolchain("msvc") if not msvc or not msvc:check() then wprint("MSVC toolchain not found for C++ Dynamic Debugging") @@ -65,8 +66,8 @@ function main(target, sourcekind) end local version = vcvars.VCToolsVersion - if not version or semver.compare(version, "19.44") < 0 then - wprint("C++ Dynamic Debugging requires MSVC 19.44+, found: %s", version or "unknown") + if not version or semver.compare(version, "14.44") < 0 then + wprint("C++ Dynamic Debugging requires Visual Studio 2022 Version 17.14 Preview 2+ (MSVC toolset 14.44+), found: %s", version or "unknown") return end |
