diff options
| author | ruki <[email protected]> | 2020-06-20 16:07:21 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-06-20 16:07:21 +0800 |
| commit | da2e3b83c53752c43b651effeb273cb72090d7b0 (patch) | |
| tree | 0a66afa1a6b6facc6753e970fe66c17343650516 /xmake/modules/core/tools/link.lua | |
| parent | 281e06a020f7704fe998be52a6ecc2711cfd4fb7 (diff) | |
add runenvs for cl/link
Diffstat (limited to 'xmake/modules/core/tools/link.lua')
| -rw-r--r-- | xmake/modules/core/tools/link.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xmake/modules/core/tools/link.lua b/xmake/modules/core/tools/link.lua index 3bcbb238d..8d1f9083d 100644 --- a/xmake/modules/core/tools/link.lua +++ b/xmake/modules/core/tools/link.lua @@ -29,10 +29,10 @@ function init(self) self:set("ldflags", "-nologo", "-dynamicbase", "-nxcompat") -- init arflags - self:set("arflags", "-nologo") + self:set("arflags", "-lib", "-nologo") -- init shflags - self:set("shflags", "-nologo") + self:set("shflags", "-dll", "-nologo") -- init flags map self:set("mapflags", @@ -52,7 +52,7 @@ function get(self, name) local values = self._INFO[name] if name == "ldflags" or name == "arflags" or name == "shflags" then -- switch architecture, @note does cache it in init() for generating vs201x project - values = table.join(values, "-machine:" .. (config.arch() or "x86")) + values = table.join(values, "-machine:" .. (self:arch() or "x86")) end return values end @@ -108,7 +108,8 @@ function link(self, objectfiles, targetkind, targetfile, flags, opt) function () -- use vstool to link and enable vs_unicode_output @see https://github.com/xmake-io/xmake/issues/528 - vstool.runv(linkargv(self, objectfiles, targetkind, targetfile, flags, opt)) + local program, argv = linkargv(self, objectfiles, targetkind, targetfile, flags, opt) + vstool.runv(program, argv, {envs = self:runenvs()}) end, catch { |
