diff options
| author | Inari0 <[email protected]> | 2024-12-20 15:00:59 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-12-20 15:00:59 +0800 |
| commit | b673bd17ca0bc1a27ea5e16e1a7f45d873cba929 (patch) | |
| tree | 7b10946feb3b509bb9c9056214583eca67cac812 | |
| parent | 1b6a5d25595c45c6e9515932975cc795ac3c8e6a (diff) | |
add profile mode for windows
| -rw-r--r-- | xmake/rules/mode/xmake.lua | 13 |
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") |
