diff options
author | Fangrui Song <maskray@google.com> | 2019-09-14 07:25:27 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-09-14 07:25:27 +0000 |
commit | 55795f1e801fe5165d80ef68ecea117c429e32cb (patch) | |
tree | 03bc37ff2618701d274d9ceda04f1287da04a564 /tools | |
parent | d59751e4fddab102c49528ebd1c3b546c0ea96fa (diff) | |
download | clang-55795f1e801fe5165d80ef68ecea117c429e32cb.tar.gz |
[clang-scan-deps] Add -M to work around -MT issue after r371918
gcc will complain if -MT is used but neither -M nor -MM is specified:
> cc1: error: to generate dependencies you must specify either -M or -MM
r371918 changed our behavior to match GCC, but apparently
clang-scan-deps is not happy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371920 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/clang-scan-deps/ClangScanDeps.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/clang-scan-deps/ClangScanDeps.cpp b/tools/clang-scan-deps/ClangScanDeps.cpp index 4bd61fb9c8..6e8d9a9ed9 100644 --- a/tools/clang-scan-deps/ClangScanDeps.cpp +++ b/tools/clang-scan-deps/ClangScanDeps.cpp @@ -242,6 +242,7 @@ int main(int argc, const char **argv) { AdjustedArgs.push_back("-o"); AdjustedArgs.push_back("/dev/null"); if (!HasMT && !HasMQ) { + AdjustedArgs.push_back("-M"); AdjustedArgs.push_back("-MT"); // We're interested in source dependencies of an object file. if (!HasMD) { |