diff options
| author | ruki <[email protected]> | 2025-07-12 22:26:55 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-07-12 22:26:55 +0800 |
| commit | bb92f25e6b397b5518b2a3f1d2e7a2b392d13ef2 (patch) | |
| tree | cff05dd477127b771154ce0334dbccab7907701a | |
| parent | 84f20e464e3438603d0b35d4ab528c4924faee66 (diff) | |
improve nim
| -rw-r--r-- | xmake/modules/core/tools/nim.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/nim.lua b/xmake/modules/core/tools/nim.lua index 2fc806178..94cc0645c 100644 --- a/xmake/modules/core/tools/nim.lua +++ b/xmake/modules/core/tools/nim.lua @@ -141,6 +141,10 @@ function buildargv(self, sourcefiles, targetkind, targetfile, flags) end flags = flags_new end + if targetkind == "static" then + local targetname = path.basename(targetkind) + table.insert(flags_extra, "--nimMainPrefix:lib" .. targetname) + end return self:program(), table.join("c", flags, flags_extra, "-o:" .. targetfile, sourcefiles) end |
