From be7af17fc8a42cf13e8f56e11439a4fa42365da3 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 26 Feb 2017 22:08:26 +0800 Subject: save tool kind for windows --- xmake/tools/cl.lua | 5 ++++- xmake/tools/lib.lua | 3 +-- xmake/tools/link.lua | 5 ++++- xmake/tools/ml.lua | 5 ++++- 4 files changed, 13 insertions(+), 5 deletions(-) mode change 100755 => 100644 xmake/tools/lib.lua mode change 100755 => 100644 xmake/tools/link.lua mode change 100755 => 100644 xmake/tools/ml.lua diff --git a/xmake/tools/cl.lua b/xmake/tools/cl.lua index b74f93ea3..3986fac90 100644 --- a/xmake/tools/cl.lua +++ b/xmake/tools/cl.lua @@ -26,11 +26,14 @@ import("core.project.project") -- init it -function init(shellname) +function init(shellname, kind) -- save the shell name _g.shellname = shellname or "cl.exe" + -- save kind + _g.kind = kind + -- init cxflags _g.cxflags = { "-nologo", "-Gd", "-MP4", "-D_MBCS", "-D_CRT_SECURE_NO_WARNINGS"} diff --git a/xmake/tools/lib.lua b/xmake/tools/lib.lua old mode 100755 new mode 100644 index 033a6e4ca..62787b405 --- a/xmake/tools/lib.lua +++ b/xmake/tools/lib.lua @@ -29,8 +29,7 @@ function init(shellname, kind) _g.shellname = shellname or "lib.exe" -- save the tool kind - _g.kind = kind or "ar" - + _g.kind = kind end -- get the property diff --git a/xmake/tools/link.lua b/xmake/tools/link.lua old mode 100755 new mode 100644 index 822bc3f0f..737a4eae9 --- a/xmake/tools/link.lua +++ b/xmake/tools/link.lua @@ -26,11 +26,14 @@ import("core.project.config") -- init it -function init(shellname) +function init(shellname, kind) -- save the shell name _g.shellname = shellname or "link.exe" + -- save the tool kind + _g.kind = kind + -- the architecture local arch = config.get("arch") diff --git a/xmake/tools/ml.lua b/xmake/tools/ml.lua old mode 100755 new mode 100644 index 705c05dbd..874d0be78 --- a/xmake/tools/ml.lua +++ b/xmake/tools/ml.lua @@ -23,11 +23,14 @@ -- -- init it -function init(shellname) +function init(shellname, kind) -- save name _g.shellname = shellname or "ml.exe" + -- save kind + _g.kind = kind + -- init asflags if _g.shellname:find("64") then _g.asflags = { "-nologo"} -- cgit v1.3.1