summaryrefslogtreecommitdiff
path: root/xmake
diff options
context:
space:
mode:
Diffstat (limited to 'xmake')
-rw-r--r--xmake/rules/c++/build_sanitizer/config.lua5
-rw-r--r--xmake/rules/mode/xmake.lua3
2 files changed, 8 insertions, 0 deletions
diff --git a/xmake/rules/c++/build_sanitizer/config.lua b/xmake/rules/c++/build_sanitizer/config.lua
index 38d548004..4f974ef4b 100644
--- a/xmake/rules/c++/build_sanitizer/config.lua
+++ b/xmake/rules/c++/build_sanitizer/config.lua
@@ -45,6 +45,11 @@ function _add_build_sanitizer(target, sourcekind, checkmode)
target:add("ldflags", "-fsanitize=" .. checkmode)
target:add("shflags", "-fsanitize=" .. checkmode)
end
+
+ -- enable the debug symbols
+ if not target:get("symbols") then
+ target:set("symbols", "debug")
+ end
end
function main(target, sourcekind)
diff --git a/xmake/rules/mode/xmake.lua b/xmake/rules/mode/xmake.lua
index 66c5e1911..d9ba61e0d 100644
--- a/xmake/rules/mode/xmake.lua
+++ b/xmake/rules/mode/xmake.lua
@@ -207,6 +207,9 @@ rule("mode.asan")
-- enable asan checker
target:set("policy", "build.sanitizer.address", true)
+
+ -- we should use "build.sanitizer.address" instead of it.
+ wprint("deprecated: please use set_policy(\"build.sanitizer.address\", true) instead of \"mode.asan\".")
end
end)