summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/config/dynamic_debugging.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2025-12-02 23:54:45 +0800
committerruki <[email protected]>2025-12-02 23:54:45 +0800
commit62b5cf94dd9bbc76a13d8dc9306e22d6c376baa7 (patch)
tree778530c350e632558ae7de9eb23696b75db4669c /xmake/rules/c++/config/dynamic_debugging.lua
parent956e77ac4bceffe0c95b7c56996f6e289912ba4f (diff)
enable debug symbols
Diffstat (limited to 'xmake/rules/c++/config/dynamic_debugging.lua')
-rw-r--r--xmake/rules/c++/config/dynamic_debugging.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/rules/c++/config/dynamic_debugging.lua b/xmake/rules/c++/config/dynamic_debugging.lua
index b9ea4716a..e201bfe8a 100644
--- a/xmake/rules/c++/config/dynamic_debugging.lua
+++ b/xmake/rules/c++/config/dynamic_debugging.lua
@@ -83,6 +83,11 @@ function main(target, sourcekind)
wprint("C++ Dynamic Debugging is incompatible with optimize=\"smallest\" (which adds /GL flag), consider using optimize=\"fastest\" or optimize=\"faster\" instead")
end
+ -- /dynamicdeopt requires debug symbols (/Zi or /Z7)
+ if not target:get("symbols") then
+ target:set("symbols", "debug")
+ end
+
-- get flag name for sourcekind (only support cc and cxx)
local cflag = sourcekind == "cxx" and "cxxflags" or "cflags"