diff options
| author | Arthur LAURENT <[email protected]> | 2025-11-07 22:46:49 +0100 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2025-11-07 22:46:49 +0100 |
| commit | 067f395b418f64b29488184bd6bcec910b94e44d (patch) | |
| tree | 1043cde2306694be74cb82beb8634f763d3ef2d0 /xmake/rules/c++/modules/scanner.lua | |
| parent | 0b91f564b00bf22d611a70c17088ba3a155b8a84 (diff) | |
(modules) don't rescan std and packages modules when using -r
Diffstat (limited to 'xmake/rules/c++/modules/scanner.lua')
| -rw-r--r-- | xmake/rules/c++/modules/scanner.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/rules/c++/modules/scanner.lua b/xmake/rules/c++/modules/scanner.lua index 3c7a04aa4..12c85e73e 100644 --- a/xmake/rules/c++/modules/scanner.lua +++ b/xmake/rules/c++/modules/scanner.lua @@ -510,7 +510,11 @@ end function _do_scan(target, sourcefile, opt) profiler.enter(target:fullname(), "c++ modules", "scanner", "scan dependencies for", sourcefile) - local changed = _scanner(target).scan_dependency_for(target, sourcefile, opt) + local fileconfig = target:fileconfig(sourcefile) + local from_package = fileconfig and fileconfig.from_package + local is_std = path.basename(sourcefile) == "std" or path.basename(sourcefile) == "std.compat" + local rescan = target:is_rebuilt() and not from_package and not is_std + local changed = _scanner(target).scan_dependency_for(target, sourcefile, rescan, opt) if changed or not support.localcache():get2(target:fullname(), "module_mapper") then support.memcache():set2(target:fullname(), "modules.changed", true) end |
