summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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