summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/modules_support
diff options
context:
space:
mode:
authorruki <[email protected]>2023-08-16 14:19:40 +0800
committerGitHub <[email protected]>2023-08-16 14:19:40 +0800
commitbeafb2d5cfca0a3d52479312b6b92ca651f4959d (patch)
tree54fa34dad7f50cb6f031af29cd115535ac640682 /xmake/rules/c++/modules/modules_support
parent2f54550cecda5c706a74158d7adc0b14a1847e51 (diff)
parenta143cb216f1c3d39c473f2f60954df8996ae7c23 (diff)
Merge pull request #4081 from Arthapz/fix-clang-cppmodules-generate-dependencies
fix clang C++20 modules generate dependencies
Diffstat (limited to 'xmake/rules/c++/modules/modules_support')
-rw-r--r--xmake/rules/c++/modules/modules_support/clang.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua
index c3f40d542..9f7e2225d 100644
--- a/xmake/rules/c++/modules/modules_support/clang.lua
+++ b/xmake/rules/c++/modules/modules_support/clang.lua
@@ -328,6 +328,7 @@ end
-- generate dependency files
function generate_dependencies(target, sourcebatch, opt)
+ local compinst = target:compiler("cxx")
local changed = false
for _, sourcefile in ipairs(sourcebatch.sourcefiles) do
local dependfile = target:dependfile(sourcefile)
@@ -358,7 +359,6 @@ function generate_dependencies(target, sourcebatch, opt)
io.writefile(jsonfile, outdata)
else
common.fallback_generate_dependencies(target, jsonfile, sourcefile, function(file)
- local compinst = target:compiler("cxx")
local compflags = compinst:compflags({sourcefile = file, target = target})
-- exclude -fmodule* and -std=c++/gnu++* flags because,
-- when they are set clang try to find bmi of imported modules but they don't exists a this point of compilation