diff options
author | Jan Korous <jkorous@apple.com> | 2019-11-08 14:16:15 -0800 |
---|---|---|
committer | Jan Korous <jkorous@apple.com> | 2019-11-08 14:28:30 -0800 |
commit | d52cff88367df4d6bc57949d5e8a61aec0c301e8 (patch) | |
tree | 52021dbddd0aee0913313353310e8c78cf2fbae3 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 4c44fd3de374fdce383ca1b0313b2418d1f1d370 (diff) | |
download | llvm-d52cff88367df4d6bc57949d5e8a61aec0c301e8.zip llvm-d52cff88367df4d6bc57949d5e8a61aec0c301e8.tar.gz llvm-d52cff88367df4d6bc57949d5e8a61aec0c301e8.tar.bz2 |
Revert "Reland "[clang] Report sanitizer blacklist as a dependency in cc1""
This reverts commit cae4a28864f4e8a55920e2b94e2cd43617902dec.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 9bd7c56..26221a8 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1447,7 +1447,26 @@ static void ParseDependencyOutputArgs(DependencyOutputOptions &Opts, // Add sanitizer blacklists as extra dependencies. // They won't be discovered by the regular preprocessor, so // we let make / ninja to know about this implicit dependency. - Opts.ExtraDeps = Args.getAllArgValues(OPT_fdepfile_entry); + if (!Args.hasArg(OPT_fno_sanitize_blacklist)) { + for (const auto *A : Args.filtered(OPT_fsanitize_blacklist)) { + StringRef Val = A->getValue(); + if (Val.find('=') == StringRef::npos) + Opts.ExtraDeps.push_back(Val); + } + if (Opts.IncludeSystemHeaders) { + for (const auto *A : Args.filtered(OPT_fsanitize_system_blacklist)) { + StringRef Val = A->getValue(); + if (Val.find('=') == StringRef::npos) + Opts.ExtraDeps.push_back(Val); + } + } + } + + // Propagate the extra dependencies. + for (const auto *A : Args.filtered(OPT_fdepfile_entry)) { + Opts.ExtraDeps.push_back(A->getValue()); + } + // Only the -fmodule-file=<file> form. for (const auto *A : Args.filtered(OPT_fmodule_file)) { StringRef Val = A->getValue(); |