summaryrefslogtreecommitdiff
path: root/xmake/rules/csharp/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2026-03-19 23:15:48 +0800
committerruki <[email protected]>2026-03-19 23:15:48 +0800
commit930be83656eb0e6dc968f672e889d43aaa166550 (patch)
tree3628c9923964f6360c531daec57a45812452ecea /xmake/rules/csharp/xmake.lua
parent879355cb0236593d8b73b4141f547585f37134e0 (diff)
add native aot
Diffstat (limited to 'xmake/rules/csharp/xmake.lua')
-rw-r--r--xmake/rules/csharp/xmake.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/rules/csharp/xmake.lua b/xmake/rules/csharp/xmake.lua
index 9a0a6e43b..603af08c3 100644
--- a/xmake/rules/csharp/xmake.lua
+++ b/xmake/rules/csharp/xmake.lua
@@ -115,10 +115,14 @@
rule("csharp.build")
set_sourcekinds("cs")
on_load(function (target)
- -- dotnet always outputs .dll for libraries, and no prefix
if target:is_shared() or target:is_static() then
+ -- dotnet always outputs without lib prefix
target:set("prefixname", "")
- target:set("extension", ".dll")
+ -- managed libraries use .dll, NativeAOT uses native format (.dylib/.so/.dll)
+ local publish_aot = target:values("csharp.publish_aot")
+ if not publish_aot then
+ target:set("extension", ".dll")
+ end
end
end)
on_config("config")