diff options
| author | Arthur LAURENT <[email protected]> | 2024-08-04 18:58:38 +0200 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2024-10-08 13:47:44 +0200 |
| commit | aad386b8e891bc8b0aa6d6db03c1f6bbaf97a15b (patch) | |
| tree | 5d97d3437b0f106fc7f4b1f2cde3313295fc6952 | |
| parent | d7d57888d888d32d5367d1c076fdb5210fdda4b2 (diff) | |
improve dependency scanner for clang
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/clang/dependency_scanner.lua | 12 |
1 files changed, 8 insertions, 4 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 8d64e3a70..e6f376365 100644 --- a/xmake/rules/c++/modules/modules_support/clang/dependency_scanner.lua +++ b/xmake/rules/c++/modules/modules_support/clang/dependency_scanner.lua @@ -48,12 +48,16 @@ function generate_dependency_for(target, sourcefile, opt) clang_path = compiler_support.get_clang_path(target) or compinst:program() end local clangscandeps = compiler_support.get_clang_scan_deps(target) - local flags = table.join({"--format=p1689", "--", - clang_path, "-x", "c++", "-c", sourcefile, "-o", target:objectfile(sourcefile)}, flags or {}) + local dependency_flags = table.join({"--format=p1689", "--", + clang_path, "-x", "c++", "-c", sourcefile, "-o", target:objectfile(sourcefile)}, flags) + if sourcefile:match("frozen") then + print(os.args(table.join(clangscandeps, dependency_flags))) + assert(false) + end if option.get("verbose") then - print(os.args(table.join(clangscandeps, flags))) + print(os.args(table.join(clangscandeps, dependency_flags))) end - local outdata, errdata = os.iorunv(clangscandeps, flags) + local outdata, errdata = os.iorunv(clangscandeps, dependency_flags) assert(errdata, errdata) io.writefile(jsonfile, outdata) |
