summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-09-27 00:49:34 +0800
committerruki <[email protected]>2024-09-27 00:49:34 +0800
commit2cafe5414f99f7fbd2134049c9585ec9cec32357 (patch)
tree24f7dcd5196be537820093fc3c493db75087e650
parentf7124e1da63d632b795558cb7c5c40c4a47d15bc (diff)
improve check_fcsnippets
-rw-r--r--xmake/modules/lib/detect/check_fcsnippets.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/xmake/modules/lib/detect/check_fcsnippets.lua b/xmake/modules/lib/detect/check_fcsnippets.lua
index 97fb63c6b..c5f346f9f 100644
--- a/xmake/modules/lib/detect/check_fcsnippets.lua
+++ b/xmake/modules/lib/detect/check_fcsnippets.lua
@@ -38,7 +38,7 @@ end
-- @param snippets the snippets
-- @param opt the argument options
-- e.g.
--- { verbose = false, target = [target|option]
+-- { verbose = false, target = [target|option], linkerkind = "fc", "cxx"
-- , configs = {defines = "xx", fcflags = ""}
-- , tryrun = true, output = true}
--
@@ -106,11 +106,12 @@ function main(snippets, opt)
opt = table.clone(opt)
opt.build_warnings = false
compiler.compile(sourcefile, objectfile, opt)
+ local linkerkind = opt.linkerkind or "fc"
if #links > 0 or opt.tryrun or opt.binary_match then
if option.get("diagnosis") then
- cprint("${dim}> %s", linker.linkcmd("binary", "fc", objectfile, binaryfile, opt))
+ cprint("${dim}> %s", linker.linkcmd("binary", linkerkind, objectfile, binaryfile, opt))
end
- linker.link("binary", "fc", objectfile, binaryfile, opt)
+ linker.link("binary", linkerkind, objectfile, binaryfile, opt)
end
if opt.tryrun then
if opt.output then