summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-12-02 23:52:44 +0800
committerruki <[email protected]>2025-12-02 23:52:44 +0800
commitf84b6f5ae9e6f2e64f81f92713e5a858ce993a27 (patch)
tree3d021e5fb03d0cc4d06279d204c78fb8b1061783
parente5b5b4dab997c27836d78ba5c49f428b67c3f31a (diff)
rename policy name
-rw-r--r--xmake/core/project/policy.lua4
-rw-r--r--xmake/rules/c++/config/dynamic_debugging.lua4
2 files changed, 4 insertions, 4 deletions
diff --git a/xmake/core/project/policy.lua b/xmake/core/project/policy.lua
index 4a0150e2a..3db1a6daa 100644
--- a/xmake/core/project/policy.lua
+++ b/xmake/core/project/policy.lua
@@ -58,8 +58,6 @@ function policy.policies()
["build.warning"] = {description = "Enable build warning output.", default = true, type = "boolean"},
-- Enable LTO linker-time optimization for c/c++ building.
["build.optimization.lto"] = {description = "Enable LTO linker-time optimization for c/c++ building.", type = "boolean"},
- -- Enable C++ Dynamic Debugging for MSVC (requires MSVC 19.44+, x64 only, incompatible with LTCG/PGO/OPT-ICF).
- ["build.dynamic_debugging"] = {description = "Enable C++ Dynamic Debugging for MSVC (requires MSVC 19.44+, x64 only, incompatible with LTCG/PGO/OPT-ICF).", type = "boolean"},
-- Enable address sanitizer for c/c++ building.
["build.sanitizer.address"] = {description = "Enable address sanitizer for c/c++ building.", type = "boolean"},
-- Enable thread sanitizer for c/c++ building.
@@ -110,6 +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 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 93f8fe01d..60fb86f7c 100644
--- a/xmake/rules/c++/config/dynamic_debugging.lua
+++ b/xmake/rules/c++/config/dynamic_debugging.lua
@@ -27,9 +27,9 @@ import("core.base.semver")
-- add dynamic debugging support
function main(target, sourcekind)
-- check if dynamic debugging is enabled
- local enabled = target:policy("build.dynamic_debugging")
+ local enabled = target:policy("build.c++.dynamic_debugging")
if enabled == nil then
- enabled = project.policy("build.dynamic_debugging")
+ enabled = project.policy("build.c++.dynamic_debugging")
end
if not enabled then
return