diff options
| author | Arthur LAURENT <[email protected]> | 2024-01-23 19:47:30 +0100 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2024-01-26 18:20:58 +0100 |
| commit | 7dddd80a592a16f5b718ec8cf96254ac220205f7 (patch) | |
| tree | f0482fe25591fa27770e7990ec2a2dc61648bf59 | |
| parent | 82714f780177852367049edeeb047bb75ca88007 (diff) | |
optimise clang fallback dependency scanner
by not preprocess #include <stlheader> to make preprocessed file smaller to parse
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/clang/dependency_scanner.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang/dependency_scanner.lua b/xmake/rules/c++/modules/modules_support/clang/dependency_scanner.lua index c1b094c80..7ad037f99 100644 --- a/xmake/rules/c++/modules/modules_support/clang/dependency_scanner.lua +++ b/xmake/rules/c++/modules/modules_support/clang/dependency_scanner.lua @@ -65,7 +65,7 @@ function generate_dependencies(target, sourcebatch, opt) return flag:startswith("-fmodule") or flag:startswith("-std=c++") or flag:startswith("-std=gnu++") end) local ifile = path.translate(path.join(outputdir, path.filename(file) .. ".i")) - local flags = table.join(compflags or {}, {"-E", "-x", "c++", file, "-o", ifile}) + local flags = table.join(compflags or {}, {"-E", "-fkeep-system-includes", "-x", "c++", file, "-o", ifile}) os.vrunv(compinst:program(), flags) local content = io.readfile(ifile) os.rm(ifile) |
