summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/rules/utils/inherit_links/inherit_links.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/rules/utils/inherit_links/inherit_links.lua b/xmake/rules/utils/inherit_links/inherit_links.lua
index cdac9ace6..e729ddf7d 100644
--- a/xmake/rules/utils/inherit_links/inherit_links.lua
+++ b/xmake/rules/utils/inherit_links/inherit_links.lua
@@ -96,9 +96,9 @@ function main(target)
local cratetype = target:values("rust.cratetype")
-- only bin, lib, rlib, dylib can make use of --extern CRATE[=PATH]
if cratetype ~= "staticlib" and cratetype ~= "cdylib" then
- local cratename = target:values("rust.cratename") or target:name()
- local extern_crate_opt = string.format('--extern %s=%s', cratename, target:targetfile())
- _add_export_value(target, "rcldflags", extern_crate_opt)
+ local extern_crate_opt = rustc:nf_framework(target:targetfile())
+ local extern_crate = table.concat(extern_crate_opt, " ")
+ _add_export_value(target, "rcflags", extern_crate)
end
end
end