xref: /llvm-project/clang/tools/clang-installapi/InstallAPIOpts.td (revision c9dc52d424b7a264d4bcb29d7f56551304396d7f)
1//===--- InstallAPIOpts.td ------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9//  This file defines the specific options for InstallAPI.
10//
11//===----------------------------------------------------------------------===//
12
13// Include the common option parsing interfaces.
14include "llvm/Option/OptParser.td"
15
16
17/////////
18// Options
19
20//
21/// TextAPI options.
22//
23def filetype : Joined<["--"], "filetype=">,
24  HelpText<"Specify the output file type (tbd-v4 or tbd-v5)">;
25def not_for_dyld_shared_cache : Joined<["-"], "not_for_dyld_shared_cache">,
26  HelpText<"Mark library as shared cache ineligible">;
27
28//
29/// Debugging or logging options.
30//
31def t: Flag<["-"], "t">,
32  HelpText<"Logs each dylib loaded for InstallAPI. Useful for debugging problems with search paths where the wrong library is loaded.">;
33
34//
35/// Verification options.
36//
37def verify_against : Separate<["-"], "verify-against">,
38  HelpText<"Verify the specified dynamic library/framework against the headers">;
39def verify_against_EQ : Joined<["--"], "verify-against=">, Alias<verify_against>;
40def verify_mode_EQ : Joined<["--"], "verify-mode=">,
41  HelpText<"Specify the severity and extend of the validation. Valid modes are ErrorsOnly, ErrorsAndWarnings, and Pedantic.">;
42def demangle : Flag<["--", "-"], "demangle">,
43  HelpText<"Demangle symbols when printing warnings and errors">;
44def dsym: Joined<["--"], "dsym=">,
45  MetaVarName<"<path>">, HelpText<"Specify dSYM path for enriched diagnostics.">;
46
47//
48/// Additional input options.
49//
50def extra_project_header : Separate<["-"], "extra-project-header">,
51  MetaVarName<"<path>">,
52  HelpText<"Add additional project header location for parsing">;
53def extra_project_header_EQ : Joined<["--"], "extra-project-header=">,
54  Alias<extra_project_header>;
55def exclude_project_header : Separate<["-"], "exclude-project-header">,
56  MetaVarName<"<glob>">,
57  HelpText<"Exclude project header from parsing">;
58def exclude_project_header_EQ : Joined<["--"], "exclude-project-header=">,
59  Alias<exclude_project_header>;
60def extra_public_header : Separate<["-"], "extra-public-header">,
61  MetaVarName<"<path>">,
62  HelpText<"Add additional public header location for parsing">;
63def extra_public_header_EQ : Joined<["--"], "extra-public-header=">,
64  Alias<extra_public_header>;
65def extra_private_header : Separate<["-"], "extra-private-header">,
66  MetaVarName<"<path>">,
67  HelpText<"Add additional private header location for parsing">;
68def extra_private_header_EQ : Joined<["--"], "extra-private-header=">,
69  Alias<extra_private_header>;
70def exclude_public_header : Separate<["-"], "exclude-public-header">,
71  MetaVarName<"<glob>">,
72  HelpText<"Exclude public header from parsing">;
73def exclude_public_header_EQ : Joined<["--"], "exclude-public-header=">,
74  Alias<exclude_public_header>;
75def exclude_private_header : Separate<["-"], "exclude-private-header">,
76  MetaVarName<"<glob>">,
77  HelpText<"Exclude private header from parsing">;
78def exclude_private_header_EQ : Joined<["--"], "exclude-private-header=">,
79  Alias<exclude_private_header>;
80def public_umbrella_header : Separate<["-"], "public-umbrella-header">,
81  MetaVarName<"<path>">, HelpText<"Specify the public umbrella header location">;
82def public_umbrella_header_EQ : Joined<["--"], "public-umbrella-header=">,
83  Alias<public_umbrella_header>;
84def private_umbrella_header : Separate<["-"], "private-umbrella-header">,
85  MetaVarName<"<path>">, HelpText<"Specify the private umbrella header location">;
86def private_umbrella_header_EQ : Joined<["--"], "private-umbrella-header=">,
87  Alias<private_umbrella_header>;
88def project_umbrella_header : Separate<["-"], "project-umbrella-header">,
89  MetaVarName<"<path>">, HelpText<"Specify the project umbrella header location">;
90def project_umbrella_header_EQ : Joined<["--"], "project-umbrella-header=">,
91  Alias<project_umbrella_header>;
92
93//
94/// X<label> overrides.
95//
96def Xplatform__ : Joined<["-"], "Xplatform_">;
97def Xproject : Joined<["-"], "Xproject">;
98def X__ : Joined<["-"], "X">,
99  HelpText<"Pass <arg> to run unique clang invocation identified as <label>">,
100  MetaVarName<"<label> <arg>">;
101
102def option_list : Separate<["-"], "optionlist">, MetaVarName<"<path>">,
103  HelpText<"Specifies the <path> to a file that contains X<label> arguments to parse.">;
104
105//
106/// Overidden clang options for different behavior.
107//
108
109// Clang's Xarch does not support options that require arguments.
110// But is supported for InstallAPI generation.
111def Xarch__ : Joined<["-"], "Xarch_">;
112def allowable_client : Separate<["-"], "allowable_client">,
113  HelpText<"Restricts what can link against the dynamic library being created">;
114def rpath: Separate<["-"], "rpath">,
115  HelpText<"Add path to the runpath search path list for the dynamic library being created.">;
116def reexport_l : Joined<["-"], "reexport-l">,
117  HelpText<"Re-export the specified library">;
118def reexport_library : Separate<["-"], "reexport_library">, MetaVarName<"<path>">,
119  HelpText<"Re-export the specified library">;
120def reexport_framework : Separate<["-"], "reexport_framework">,
121  HelpText<"Re-export the specified framework">;
122
123// Xproject supported options.
124def fobjc_arc : Flag<["-"], "fobjc-arc">,
125  HelpText<"Synthesize retain and release calls for Objective-C pointers">;
126def include_ : JoinedOrSeparate<["-", "--"], "include">,
127  MetaVarName<"<file>">, HelpText<"Include file before parsing, can only be used with -Xproject">;
128def fvisibility_EQ : Joined<["-"], "fvisibility=">,
129  HelpText<"Set the default symbol visibility for all global declarations">;
130def fmodules : Flag <["-"], "fmodules">,
131  HelpText<"Enable the 'modules' language feature">;
132def fmodules_cache_path : Joined<["-"], "fmodules-cache-path=">,
133  MetaVarName<"<directory>">,
134  HelpText<"Specify the module cache path">;
135
136// Xplatform supported options.
137def iframework : JoinedOrSeparate<["-"], "iframework">,
138  HelpText<"Add directory to SYSTEM framework search path">;
139
140// X<label> prefixes supported options.
141def D : JoinedOrSeparate<["-"], "D">, HelpText<"Define macro">;
142def U : JoinedOrSeparate<["-"], "U">, HelpText<"Undefine macro">;
143
144
145