diff options
| author | Arthur LAURENT <[email protected]> | 2022-11-30 17:35:28 +0100 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2022-11-30 17:35:28 +0100 |
| commit | d18ba1a5013f4e0cc7a408d8b2701484e54d1406 (patch) | |
| tree | bb2600160e762538d6213ecccea70455799ef4f4 /xmake/rules/c++/modules/modules_support/clang.lua | |
| parent | df25bc8dfac8cbf690f6dff8dd263421a7ca795a (diff) | |
Fix clang module support
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/clang.lua')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/clang.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua index a3cf06e79..678a0ccd3 100644 --- a/xmake/rules/c++/modules/modules_support/clang.lua +++ b/xmake/rules/c++/modules/modules_support/clang.lua @@ -110,7 +110,7 @@ end -- # 58 "/usr/include/c++/11/vector" 3 -- # 59 "/usr/include/c++/11/vector" 3 -- -function _get_toolchain_includedirs_for_stlheaders(includedirs, clang) +function _get_toolchain_includedirs_for_stlheaders(target, includedirs, clang) local tmpfile = os.tmpfile() .. ".cc" io.writefile(tmpfile, "#include <vector>") local argv = {"-E", "-x", "c++", tmpfile} @@ -181,7 +181,7 @@ function toolchain_includedirs(target) includedirs = {} local clang, toolname = target:tool("cc") assert(toolname == "clang") - _get_toolchain_includedirs_for_stlheaders(includedirs, clang) + _get_toolchain_includedirs_for_stlheaders(target, includedirs, clang) local _, result = try {function () return os.iorunv(clang, {"-E", "-Wp,-v", "-xc", os.nuldev()}) end} if result then for _, line in ipairs(result:split("\n", {plain = true})) do |
