summaryrefslogtreecommitdiff
path: root/xmake/core/tool/compiler.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-06-20 16:07:21 +0800
committerruki <[email protected]>2020-06-20 16:07:21 +0800
commitda2e3b83c53752c43b651effeb273cb72090d7b0 (patch)
tree0a66afa1a6b6facc6753e970fe66c17343650516 /xmake/core/tool/compiler.lua
parent281e06a020f7704fe998be52a6ecc2711cfd4fb7 (diff)
add runenvs for cl/link
Diffstat (limited to 'xmake/core/tool/compiler.lua')
-rw-r--r--xmake/core/tool/compiler.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/core/tool/compiler.lua b/xmake/core/tool/compiler.lua
index e56f2d300..c47ffb9e1 100644
--- a/xmake/core/tool/compiler.lua
+++ b/xmake/core/tool/compiler.lua
@@ -78,13 +78,13 @@ end
function compiler._load_tool(sourcekind, target)
-- get program from target
- local program, toolname
+ local program, toolname, toolchain_info
if target and target:type() == "target" then
- program, toolname = target:tool(sourcekind)
+ program, toolname, toolchain_info = target:tool(sourcekind)
end
-- load the compiler tool from the source kind
- local result, errors = tool.load(sourcekind, program, toolname)
+ local result, errors = tool.load(sourcekind, {program = program, toolname = toolname, toolchain_info = toolchain_info})
if not result then
return nil, errors
end
@@ -236,7 +236,7 @@ function compiler:compile(sourcefiles, objectfile, opt)
end
-- compile it
- return sandbox.load(self:_tool().compile, self:_tool(), sourcefiles, objectfile, opt.dependinfo, compflags)
+ return sandbox.load(self:_tool().compile, self:_tool(), sourcefiles, objectfile, opt.dependinfo, compflags, opt)
end
-- get the compile arguments list