1 //===--- DependencyOutputOptions.h ------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_CLANG_FRONTEND_DEPENDENCYOUTPUTOPTIONS_H
11 #define LLVM_CLANG_FRONTEND_DEPENDENCYOUTPUTOPTIONS_H
18 /// DependencyOutputFormat - Format for the compiler dependency file.
19 enum class DependencyOutputFormat { Make, NMake };
21 /// DependencyOutputOptions - Options for controlling the compiler dependency
23 class DependencyOutputOptions {
25 unsigned IncludeSystemHeaders : 1; ///< Include system header dependencies.
26 unsigned ShowHeaderIncludes : 1; ///< Show header inclusions (-H).
27 unsigned UsePhonyTargets : 1; ///< Include phony targets for each
28 /// dependency, which can avoid some 'make'
30 unsigned AddMissingHeaderDeps : 1; ///< Add missing headers to dependency list
31 unsigned PrintShowIncludes : 1; ///< Print cl.exe style /showIncludes info.
32 unsigned IncludeModuleFiles : 1; ///< Include module file dependencies.
34 /// The format for the dependency file.
35 DependencyOutputFormat OutputFormat;
37 /// The file to write dependency output to.
38 std::string OutputFile;
40 /// The file to write header include output to. This is orthogonal to
41 /// ShowHeaderIncludes (-H) and will include headers mentioned in the
42 /// predefines buffer. If the output file is "-", output will be sent to
44 std::string HeaderIncludeOutputFile;
46 /// A list of names to use as the targets in the dependency file; this list
47 /// must contain at least one entry.
48 std::vector<std::string> Targets;
50 /// A list of filenames to be used as extra dependencies for every target.
51 std::vector<std::string> ExtraDeps;
53 /// \brief The file to write GraphViz-formatted header dependencies to.
54 std::string DOTOutputFile;
56 /// \brief The directory to copy module dependencies to when collecting them.
57 std::string ModuleDependencyOutputDir;
60 DependencyOutputOptions() {
61 IncludeSystemHeaders = 0;
62 ShowHeaderIncludes = 0;
64 AddMissingHeaderDeps = 0;
65 PrintShowIncludes = 0;
66 IncludeModuleFiles = 0;
67 OutputFormat = DependencyOutputFormat::Make;
71 } // end namespace clang