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 /// ShowIncludesDestination - Destination for /showIncludes output.
19 enum class ShowIncludesDestination { None, Stdout, Stderr };
21 /// DependencyOutputFormat - Format for the compiler dependency file.
22 enum class DependencyOutputFormat { Make, NMake };
24 /// DependencyOutputOptions - Options for controlling the compiler dependency
26 class DependencyOutputOptions {
28 unsigned IncludeSystemHeaders : 1; ///< Include system header dependencies.
29 unsigned ShowHeaderIncludes : 1; ///< Show header inclusions (-H).
30 unsigned UsePhonyTargets : 1; ///< Include phony targets for each
31 /// dependency, which can avoid some 'make'
33 unsigned AddMissingHeaderDeps : 1; ///< Add missing headers to dependency list
34 unsigned IncludeModuleFiles : 1; ///< Include module file dependencies.
36 /// Destination of cl.exe style /showIncludes info.
37 ShowIncludesDestination ShowIncludesDest = ShowIncludesDestination::None;
39 /// The format for the dependency file.
40 DependencyOutputFormat OutputFormat = DependencyOutputFormat::Make;
42 /// The file to write dependency output to.
43 std::string OutputFile;
45 /// The file to write header include output to. This is orthogonal to
46 /// ShowHeaderIncludes (-H) and will include headers mentioned in the
47 /// predefines buffer. If the output file is "-", output will be sent to
49 std::string HeaderIncludeOutputFile;
51 /// A list of names to use as the targets in the dependency file; this list
52 /// must contain at least one entry.
53 std::vector<std::string> Targets;
55 /// A list of filenames to be used as extra dependencies for every target.
56 std::vector<std::string> ExtraDeps;
58 /// In /showIncludes mode, pretend the main TU is a header with this name.
59 std::string ShowIncludesPretendHeader;
61 /// The file to write GraphViz-formatted header dependencies to.
62 std::string DOTOutputFile;
64 /// The directory to copy module dependencies to when collecting them.
65 std::string ModuleDependencyOutputDir;
68 DependencyOutputOptions()
69 : IncludeSystemHeaders(0), ShowHeaderIncludes(0), UsePhonyTargets(0),
70 AddMissingHeaderDeps(0), IncludeModuleFiles(0) {}
73 } // end namespace clang