summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-11-21 09:01:49 +0800
committerGitHub <[email protected]>2025-11-21 09:01:49 +0800
commit35bc14eee3c7568bc45591b435fce4d70c28dca9 (patch)
tree4cfc6a4b7759fc995fbfc43ba62d247b96873961
parent6046c050650e63b430777dda1c6ce497ac43917e (diff)
parent03e8785ea6fe7125a71f25434294afdbe78a4f9d (diff)
Merge pull request #7044 from RoqueDeicide/dev
Fix fallback scanner creating circular dependencies out of thin air.
-rw-r--r--xmake/rules/c++/modules/scanner.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/rules/c++/modules/scanner.lua b/xmake/rules/c++/modules/scanner.lua
index 12c85e73e..6d8c9d9bf 100644
--- a/xmake/rules/c++/modules/scanner.lua
+++ b/xmake/rules/c++/modules/scanner.lua
@@ -699,9 +699,9 @@ function fallback_generate_dependencies(target, jsonfile, sourcefile, preprocess
end
end
local module_depname = line:match("import%s+(.+)%s*;")
- -- we need to parse module interface dep in cxx/impl_unit.cpp, e.g. hello.mpp and hello_impl.cpp
- -- @see https://github.com/xmake-io/xmake/pull/2664#issuecomment-1213167314
- if not module_depname and not support.has_module_extension(sourcefile) then
+ -- Normal module implementation units need to reference the module interface unit, module and partition interface units,
+ -- as well as partition implementation units don't have this requirement.
+ if not module_depname and not module_name_export and not internal then
module_depname = module_name_private
end
if module_depname and not module_deps_set:has(module_depname) then