diff options
| author | ruki <[email protected]> | 2024-09-21 00:56:56 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-09-23 09:43:53 +0800 |
| commit | 7af1ca50e38a7cf21048be7a62bd30103421cceb (patch) | |
| tree | aeb13deca5fcab0a43554fe120d3091a52e5637c /xmake/core/tool/linker.lua | |
| parent | 4fd8d5eec226060ee62b24c56ae4e303d4ededba (diff) | |
fix host toolchain
Diffstat (limited to 'xmake/core/tool/linker.lua')
| -rw-r--r-- | xmake/core/tool/linker.lua | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/xmake/core/tool/linker.lua b/xmake/core/tool/linker.lua index 2094d40a5..d91da81d8 100644 --- a/xmake/core/tool/linker.lua +++ b/xmake/core/tool/linker.lua @@ -88,8 +88,18 @@ function linker._load_tool(targetkind, sourcekinds, target) program, toolname, toolchain_info = target:tool(_linkerinfo.linkerkind) end + -- is host? + local is_host + if target and target.is_host then + is_host = target:is_host() + end + -- load the linker tool from the linker kind (with cache) - linkertool, errors = tool.load(_linkerinfo.linkerkind, {program = program, toolname = toolname, toolchain_info = toolchain_info}) + linkertool, errors = tool.load(_linkerinfo.linkerkind, { + host = is_host, + program = program, + toolname = toolname, + toolchain_info = toolchain_info}) if linkertool then linkerinfo = _linkerinfo linkerinfo.program = program |
