diff options
| author | Arthur LAURENT <[email protected]> | 2022-12-01 15:57:04 +0100 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2022-12-01 15:57:04 +0100 |
| commit | 6479822a2179db58dab05e0f1b60aa4cf6c48b98 (patch) | |
| tree | fe4dcf5d7839808afd6680a920da7be975288b32 /xmake/rules/c++/modules/modules_support/msvc.lua | |
| parent | e2c6eb2208f05cba0fe499656e2d8de1b70c9410 (diff) | |
fix msvc.lua
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/msvc.lua')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/msvc.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/rules/c++/modules/modules_support/msvc.lua b/xmake/rules/c++/modules/modules_support/msvc.lua index d153bc2d2..91b7afbc5 100644 --- a/xmake/rules/c++/modules/modules_support/msvc.lua +++ b/xmake/rules/c++/modules/modules_support/msvc.lua @@ -172,7 +172,7 @@ end -- generate dependency files function generate_dependencies(target, sourcebatch, opt) local toolchain = target:toolchain("msvc") - local vcvars = toolchain:config("vcvars") + local scandependenciesflag = nil -- get_scandependenciesflag(target) local scandependenciesflag = get_scandependenciesflag(target) local common_flags = {"-TP", scandependenciesflag} local cachedir = common.modules_cachedir(target) @@ -200,7 +200,7 @@ function generate_dependencies(target, sourcebatch, opt) table.insert(defines, "/D" .. define) end local ifile = path.translate(path.join(outputdir, path.filename(file) .. ".i")) - os.vrunv(compinst:program(), table.join(defines, {"/nologo", get_cppversionflag(target), "/P", file, "/Fi" .. ifile}), {envs = vcvars}) + os.vrunv(compinst:program(), table.join(defines, {"/nologo", get_cppversionflag(target), "/P", "-TP", file, "/Fi" .. ifile}), {envs = toolchain:runenvs()}) local content = io.readfile(ifile) os.rm(ifile) return content |
