diff options
| author | Arthur LAURENT <[email protected]> | 2025-04-23 18:40:13 +0200 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2025-04-23 18:40:13 +0200 |
| commit | a26ab0a2df198a1af1c3a68d63fd16b042b01486 (patch) | |
| tree | 2f1a05acfc39d8f49ee738ef6bcbc148cec7f2c6 /xmake/rules/c++/modules/gcc/scanner.lua | |
| parent | d60e9b244f091593232fffae837ec0504c51f032 (diff) | |
(C++ modules support) improve modules policy naming
Diffstat (limited to 'xmake/rules/c++/modules/gcc/scanner.lua')
| -rw-r--r-- | xmake/rules/c++/modules/gcc/scanner.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/rules/c++/modules/gcc/scanner.lua b/xmake/rules/c++/modules/gcc/scanner.lua index 1496d17dd..8abf08c44 100644 --- a/xmake/rules/c++/modules/gcc/scanner.lua +++ b/xmake/rules/c++/modules/gcc/scanner.lua @@ -37,6 +37,9 @@ function generate_dependency_for(target, sourcefile, opt) local dependfile = target:dependfile(sourcefile) local flags = compinst:compflags({sourcefile = sourcefile, target = target}) or {} local changed = false + local fallbackscanner = target:policy("build.c++.modules.fallbackscanner") or + target:policy("build.c++.modules.gcc.fallbackscanner") or + target:policy("build.c++.gcc.fallbackscanner") depend.on_changed(function() if opt.progress then @@ -46,7 +49,7 @@ function generate_dependency_for(target, sourcefile, opt) local outputdir = support.get_outputdir(target, sourcefile) local jsonfile = path.translate(path.join(outputdir, path.filename(sourcefile) .. ".json")) local has_depsflags = depsformatflag and depsfileflag and depstargetflag - if has_depsflags and not target:policy("build.c++.gcc.fallbackscanner") then + if has_depsflags and not fallbackscanner then local ifile = path.translate(path.join(outputdir, path.filename(sourcefile) .. ".i")) local dfile = path.translate(path.join(outputdir, path.filename(sourcefile) .. ".d")) local compflags = table.join(flags or {}, baselineflags, {sourcefile, "-MT", jsonfile, "-MD", "-MF", dfile, depsformatflag, depsfileflag .. jsonfile, depstargetflag .. target:objectfile(sourcefile), "-o", ifile}) |
