This revision was automatically updated to reflect the committed changes. Closed by commit rG669771cfe75b: [clang][deps] NFC: Preserve the original frontend action (authored by jansvoboda11).
Changed prior to commit: https://reviews.llvm.org/D103461?vs=349229&id=351795#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103461/new/ https://reviews.llvm.org/D103461 Files: clang/tools/clang-scan-deps/ClangScanDeps.cpp Index: clang/tools/clang-scan-deps/ClangScanDeps.cpp =================================================================== --- clang/tools/clang-scan-deps/ClangScanDeps.cpp +++ clang/tools/clang-scan-deps/ClangScanDeps.cpp @@ -462,6 +462,10 @@ std::make_unique<tooling::ArgumentsAdjustingCompilations>( std::move(Compilations)); ResourceDirectoryCache ResourceDirCache; + + // FIXME: Adjust the resulting CompilerInvocation in DependencyScanningAction + // instead of parsing and adjusting the raw command-line. This will make it + // possible to remove some code specific to clang-cl and Windows. AdjustingCompilations->appendArgumentsAdjuster( [&ResourceDirCache](const tooling::CommandLineArguments &Args, StringRef FileName) { @@ -532,7 +536,7 @@ #else AdjustedArgs.push_back("/dev/null"); #endif - if (!HasMT && !HasMQ) { + if (!HasMT && !HasMQ && Format == ScanningOutputFormat::Make) { // We're interested in source dependencies of an object file. std::string FileNameArg; if (!HasMD) { @@ -553,8 +557,6 @@ } } AdjustedArgs.push_back("-Xclang"); - AdjustedArgs.push_back("-Eonly"); - AdjustedArgs.push_back("-Xclang"); AdjustedArgs.push_back("-sys-header-deps"); AdjustedArgs.push_back("-Wno-error");
Index: clang/tools/clang-scan-deps/ClangScanDeps.cpp =================================================================== --- clang/tools/clang-scan-deps/ClangScanDeps.cpp +++ clang/tools/clang-scan-deps/ClangScanDeps.cpp @@ -462,6 +462,10 @@ std::make_unique<tooling::ArgumentsAdjustingCompilations>( std::move(Compilations)); ResourceDirectoryCache ResourceDirCache; + + // FIXME: Adjust the resulting CompilerInvocation in DependencyScanningAction + // instead of parsing and adjusting the raw command-line. This will make it + // possible to remove some code specific to clang-cl and Windows. AdjustingCompilations->appendArgumentsAdjuster( [&ResourceDirCache](const tooling::CommandLineArguments &Args, StringRef FileName) { @@ -532,7 +536,7 @@ #else AdjustedArgs.push_back("/dev/null"); #endif - if (!HasMT && !HasMQ) { + if (!HasMT && !HasMQ && Format == ScanningOutputFormat::Make) { // We're interested in source dependencies of an object file. std::string FileNameArg; if (!HasMD) { @@ -553,8 +557,6 @@ } } AdjustedArgs.push_back("-Xclang"); - AdjustedArgs.push_back("-Eonly"); - AdjustedArgs.push_back("-Xclang"); AdjustedArgs.push_back("-sys-header-deps"); AdjustedArgs.push_back("-Wno-error");
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits