summaryrefslogtreecommitdiff
path: root/xmake/modules/lib/detect/has_flags.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-07-24 11:45:51 +0800
committerGitHub <[email protected]>2019-07-24 11:45:51 +0800
commitaac063beb4c7aaf00ad84ff6f49c9f3b5b409821 (patch)
tree20999cc1d378f03aba31cfc24f362dfb9f4c6f77 /xmake/modules/lib/detect/has_flags.lua
parent106dbd415ff84325c5f85058159fc462ba66bd85 (diff)
parenta99ed5924ed00e195c0dacc036625bdb4d10f9a8 (diff)
Merge pull request #508 from OpportunityLiu/dev
Improve package loader
Diffstat (limited to 'xmake/modules/lib/detect/has_flags.lua')
-rw-r--r--xmake/modules/lib/detect/has_flags.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/modules/lib/detect/has_flags.lua b/xmake/modules/lib/detect/has_flags.lua
index c9cdd9a6a..266d224dd 100644
--- a/xmake/modules/lib/detect/has_flags.lua
+++ b/xmake/modules/lib/detect/has_flags.lua
@@ -28,7 +28,7 @@ import("lib.detect.find_tool")
--
-- @param name the tool name
-- @param flags the flags
--- @param opt the argument options, .e.g { verbose = false, program = "", sysflags = {}, flagkind = "cxflag", toolkind = "[cc|cxx|ld|ar|sh|gc|rc|dc|mm|mxx]", flagskey = "custom key" }
+-- @param opt the argument options, e.g. { verbose = false, program = "", sysflags = {}, flagkind = "cxflag", toolkind = "[cc|cxx|ld|ar|sh|gc|rc|dc|mm|mxx]", flagskey = "custom key" }
--
-- @return true or false
--
@@ -65,7 +65,7 @@ function main(name, flags, opt)
-- get tool architecture
--
- -- some tools select arch by path environment, not be flags, .e.g cl.exe of msvc)
+ -- some tools select arch by path environment, not be flags, e.g. cl.exe of msvc)
-- so, it will affect the cache result
--
local arch = config.get("arch") or os.arch()
@@ -73,7 +73,7 @@ function main(name, flags, opt)
-- init cache key
local key = plat .. "_" .. arch .. "_" .. tool.program .. "_" .. (tool.version or "") .. "_" .. (opt.toolkind or "") .. "_" .. (opt.flagkind or "") .. "_" .. table.concat(opt.sysflags, " ") .. "_" .. opt.flagskey
- -- @note avoid detect the same program in the same time if running in the coroutine (.e.g ccache)
+ -- @note avoid detect the same program in the same time if running in the coroutine (e.g. ccache)
local coroutine_running = coroutine.running()
if coroutine_running then
while _g._checking ~= nil and _g._checking == key do
@@ -93,7 +93,7 @@ function main(name, flags, opt)
-- generate all checked flags
local checkflags = table.join(flags, opt.sysflags)
- -- split flag group, .e.g "-I /xxx" => {"-I", "/xxx"}
+ -- split flag group, e.g. "-I /xxx" => {"-I", "/xxx"}
local results = {}
for _, flag in ipairs(checkflags) do
flag = flag:trim()