1199482Srdivacky//===--- DependencyOutputOptions.h ------------------------------*- C++ -*-===// 2199482Srdivacky// 3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4353358Sdim// See https://llvm.org/LICENSE.txt for license information. 5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6199482Srdivacky// 7199482Srdivacky//===----------------------------------------------------------------------===// 8199482Srdivacky 9199482Srdivacky#ifndef LLVM_CLANG_FRONTEND_DEPENDENCYOUTPUTOPTIONS_H 10199482Srdivacky#define LLVM_CLANG_FRONTEND_DEPENDENCYOUTPUTOPTIONS_H 11199482Srdivacky 12199482Srdivacky#include <string> 13199482Srdivacky#include <vector> 14199482Srdivacky 15199482Srdivackynamespace clang { 16199482Srdivacky 17341825Sdim/// ShowIncludesDestination - Destination for /showIncludes output. 18341825Sdimenum class ShowIncludesDestination { None, Stdout, Stderr }; 19341825Sdim 20288943Sdim/// DependencyOutputFormat - Format for the compiler dependency file. 21288943Sdimenum class DependencyOutputFormat { Make, NMake }; 22288943Sdim 23199482Srdivacky/// DependencyOutputOptions - Options for controlling the compiler dependency 24199482Srdivacky/// file generation. 25199482Srdivackyclass DependencyOutputOptions { 26199482Srdivackypublic: 27199482Srdivacky unsigned IncludeSystemHeaders : 1; ///< Include system header dependencies. 28218893Sdim unsigned ShowHeaderIncludes : 1; ///< Show header inclusions (-H). 29199482Srdivacky unsigned UsePhonyTargets : 1; ///< Include phony targets for each 30199482Srdivacky /// dependency, which can avoid some 'make' 31199482Srdivacky /// problems. 32224145Sdim unsigned AddMissingHeaderDeps : 1; ///< Add missing headers to dependency list 33276479Sdim unsigned IncludeModuleFiles : 1; ///< Include module file dependencies. 34288943Sdim 35341825Sdim /// Destination of cl.exe style /showIncludes info. 36341825Sdim ShowIncludesDestination ShowIncludesDest = ShowIncludesDestination::None; 37341825Sdim 38288943Sdim /// The format for the dependency file. 39341825Sdim DependencyOutputFormat OutputFormat = DependencyOutputFormat::Make; 40288943Sdim 41218893Sdim /// The file to write dependency output to. 42199482Srdivacky std::string OutputFile; 43199482Srdivacky 44218893Sdim /// The file to write header include output to. This is orthogonal to 45218893Sdim /// ShowHeaderIncludes (-H) and will include headers mentioned in the 46218893Sdim /// predefines buffer. If the output file is "-", output will be sent to 47218893Sdim /// stderr. 48218893Sdim std::string HeaderIncludeOutputFile; 49218893Sdim 50199482Srdivacky /// A list of names to use as the targets in the dependency file; this list 51199482Srdivacky /// must contain at least one entry. 52199482Srdivacky std::vector<std::string> Targets; 53199482Srdivacky 54296417Sdim /// A list of filenames to be used as extra dependencies for every target. 55296417Sdim std::vector<std::string> ExtraDeps; 56296417Sdim 57309124Sdim /// In /showIncludes mode, pretend the main TU is a header with this name. 58309124Sdim std::string ShowIncludesPretendHeader; 59309124Sdim 60341825Sdim /// The file to write GraphViz-formatted header dependencies to. 61234353Sdim std::string DOTOutputFile; 62276479Sdim 63341825Sdim /// The directory to copy module dependencies to when collecting them. 64276479Sdim std::string ModuleDependencyOutputDir; 65276479Sdim 66199482Srdivackypublic: 67341825Sdim DependencyOutputOptions() 68341825Sdim : IncludeSystemHeaders(0), ShowHeaderIncludes(0), UsePhonyTargets(0), 69341825Sdim AddMissingHeaderDeps(0), IncludeModuleFiles(0) {} 70199482Srdivacky}; 71199482Srdivacky 72199482Srdivacky} // end namespace clang 73199482Srdivacky 74199482Srdivacky#endif 75