diff options
| author | Arthur LAURENT <[email protected]> | 2024-03-07 11:28:39 +0100 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2024-03-07 11:28:39 +0100 |
| commit | a7a6202288ae1975bb2f9a710786912b7cceda84 (patch) | |
| tree | 2633c3981d892fc1767e2e558204023e5111e516 /xmake/modules | |
| parent | 2c67c028dffe3e456e8b9ac16296ef042629b88b (diff) | |
use iorunv and pass runenvs to llvm triple detection
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/core/tools/clang.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/clang.lua b/xmake/modules/core/tools/clang.lua index 9e0e23cd2..79a274a21 100644 --- a/xmake/modules/core/tools/clang.lua +++ b/xmake/modules/core/tools/clang.lua @@ -195,7 +195,7 @@ end function _get_llvm_rootdir(self) local llvm_rootdir = _g._LLVM_ROOTDIR if llvm_rootdir == nil then - local outdata = try { function() return os.iorun(self:program() .. " -print-resource-dir") end } + local outdata = try { function() return os.iorunv(self:program(), {"-print-resource-dir"}, {envs = self:runenvs()}) end } if outdata then llvm_rootdir = path.normalize(path.join(outdata:trim(), "..", "..", "..")) if not os.isdir(llvm_rootdir) then @@ -211,7 +211,7 @@ end function _get_llvm_target_triple(self) local llvm_targettriple = _g._LLVM_TARGETTRIPLE if llvm_targettriple == nil then - local outdata = try { function() return os.iorun(self:program() .. " -print-target-triple") end } + local outdata = try { function() return os.iorunv(self:program(), {"-print-target-triple"}, {envs = self:runenvs()}) end } if outdata then llvm_targettriple = outdata:trim() end |
