diff options
| author | ruki <[email protected]> | 2017-06-21 18:53:20 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-06-21 18:53:20 +0800 |
| commit | e7fd0a5c178956eb4801de3780f2bc3c0e7a3e1e (patch) | |
| tree | c1691a33309a18cf9b5c54dda592f33a8a7abd66 /xmake/core/tool/compiler.lua | |
| parent | 45a54659f7449ead7ed073f9c0cbbe1da9fcdc06 (diff) | |
move tools dir to core.tools and improve tool module
Diffstat (limited to 'xmake/core/tool/compiler.lua')
| -rw-r--r-- | xmake/core/tool/compiler.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xmake/core/tool/compiler.lua b/xmake/core/tool/compiler.lua index a550564da..d6a1c74ed 100644 --- a/xmake/core/tool/compiler.lua +++ b/xmake/core/tool/compiler.lua @@ -50,7 +50,7 @@ end function compiler:_addflags_from_platform(flags, targetkind) -- add flags - local toolkind = self:get("kind") + local toolkind = self:kind() for _, flagkind in ipairs(self:_flagkinds()) do -- add flags for platform @@ -128,28 +128,28 @@ end function compiler:build(sourcefiles, targetkind, targetfile, target) -- get it - return sandbox.load(self:_tool().build, sourcefiles, targetkind, targetfile, (self:compflags(target)) .. " " .. (target:linkflags())) + return sandbox.load(self:_tool().build, self:_tool(), sourcefiles, targetkind, targetfile, (self:compflags(target)) .. " " .. (target:linkflags())) end -- get the build command function compiler:buildcmd(sourcefiles, targetkind, targetfile, target) -- get it - return self:_tool().buildcmd(sourcefiles, targetkind, targetfile, (self:compflags(target) .. " " .. (target:linkflags()))) + return self:_tool():buildcmd(sourcefiles, targetkind, targetfile, (self:compflags(target) .. " " .. (target:linkflags()))) end -- compile the source files function compiler:compile(sourcefiles, objectfile, incdepfile, target) -- compile it - return sandbox.load(self:_tool().compile, sourcefiles, objectfile, incdepfile, (self:compflags(target))) + return sandbox.load(self:_tool().compile, self:_tool(), sourcefiles, objectfile, incdepfile, (self:compflags(target))) end -- get the compile command function compiler:compcmd(sourcefiles, objectfile, target) -- get it - return self:_tool().compcmd(sourcefiles, objectfile, (self:compflags(target))) + return self:_tool():compcmd(sourcefiles, objectfile, (self:compflags(target))) end -- get the compling flags |
