summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/rules/mode/xmake.lua13
1 files changed, 9 insertions, 4 deletions
diff --git a/xmake/rules/mode/xmake.lua b/xmake/rules/mode/xmake.lua
index 308dec90f..06aeffdcb 100644
--- a/xmake/rules/mode/xmake.lua
+++ b/xmake/rules/mode/xmake.lua
@@ -156,10 +156,15 @@ rule("mode.profile")
end
end
- -- enable gprof
- target:add("cxflags", "-pg")
- target:add("mxflags", "-pg")
- target:add("ldflags", "-pg")
+ if target:is_plat("windows") then
+ -- enable vs profile
+ target:add("ldflags", "/profile")
+ else
+ -- enable gprof
+ target:add("cxflags", "-pg")
+ target:add("mxflags", "-pg")
+ target:add("ldflags", "-pg")
+ end
-- enable NDEBUG macros to disables standard-C assertions
target:add("cxflags", "-DNDEBUG")