diff options
author | Ivan Krasin <krasin@chromium.org> | 2015-08-13 04:04:37 +0000 |
---|---|---|
committer | Ivan Krasin <krasin@chromium.org> | 2015-08-13 04:04:37 +0000 |
commit | 1193f2cbc021f040eef6f97ec72dad5fb1efb7b1 (patch) | |
tree | 921577b0f91fddfff3a6ab823d8ea049d7898919 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 1142f83ce2c28012e611903635a775a8b8944580 (diff) | |
download | llvm-1193f2cbc021f040eef6f97ec72dad5fb1efb7b1.zip llvm-1193f2cbc021f040eef6f97ec72dad5fb1efb7b1.tar.gz llvm-1193f2cbc021f040eef6f97ec72dad5fb1efb7b1.tar.bz2 |
Add sanitizer blacklists to the rules generated with -M/-MM/-MD/-MMD.
Summary:
Clang sanitizers, such as AddressSanitizer, ThreadSanitizer, MemorySanitizer,
Control Flow Integrity and others, use blacklists to specify which types / functions
should not be instrumented to avoid false positives or suppress known failures.
This change adds the blacklist filenames to the list of dependencies of the rules,
generated with -M/-MM/-MD/-MMD. This lets CMake/Ninja recognize that certain
C/C++/ObjC files need to be recompiled (if a blacklist is updated).
Reviewers: pcc
Subscribers: rsmith, honggyu.kim, pcc, cfe-commits
Differential Revision: http://reviews.llvm.org/D11968
llvm-svn: 244867
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 8934c80..ae1ccd7 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -705,6 +705,10 @@ static void ParseDependencyOutputArgs(DependencyOutputOptions &Opts, Args.getLastArgValue(OPT_module_dependency_dir); if (Args.hasArg(OPT_MV)) Opts.OutputFormat = DependencyOutputFormat::NMake; + // 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_fsanitize_blacklist); } bool clang::ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args, |