summaryrefslogtreecommitdiff
path: root/xmake/modules/lib/detect/has_flags.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-03-17 22:36:01 +0800
committerruki <[email protected]>2023-03-17 22:36:01 +0800
commit102d82df48e78f2bc0ef9d8650956c57504a3f1f (patch)
tree2e4d5096e0eac0b3ce398393f62dcb95dc9aa728 /xmake/modules/lib/detect/has_flags.lua
parent4d78fc5549b7033096812effcdc33cdb06e2abc2 (diff)
trace more tag
Diffstat (limited to 'xmake/modules/lib/detect/has_flags.lua')
-rw-r--r--xmake/modules/lib/detect/has_flags.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/xmake/modules/lib/detect/has_flags.lua b/xmake/modules/lib/detect/has_flags.lua
index 3567ceae6..dc11db11c 100644
--- a/xmake/modules/lib/detect/has_flags.lua
+++ b/xmake/modules/lib/detect/has_flags.lua
@@ -21,6 +21,7 @@
-- imports
import("core.base.option")
import("core.base.scheduler")
+import("core.base.profiler")
import("core.project.config")
import("core.cache.detectcache")
import("lib.detect.find_tool")
@@ -117,6 +118,9 @@ function main(name, flags, opt)
end
checkflags = results
+ -- start profile
+ profiler.enter("has_flags", tool.name, checkflags[1])
+
-- detect.tools.xxx.has_flags(flags, opt)?
_g._checking = coroutine_running and key or nil
local hasflags = import("detect.tools." .. tool.name .. ".has_flags", {try = true})
@@ -132,6 +136,9 @@ function main(name, flags, opt)
_g._checking = nil
result = result or false
+ -- stop profile
+ profiler.leave("has_flags", tool.name, checkflags[1])
+
-- trace
if option.get("verbose") or option.get("diagnosis") or opt.verbose then
cprintf("${dim}checking for flags (")