| 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. |
| 14 |
include "llvm/Option/OptParser.td" |
| 15 |
|
| 16 |
|
| 17 |
///////// |
| 18 |
// Options |
| 19 |
|
| 20 |
// |
| 21 |
/// TextAPI options. |
| 22 |
// |
| 23 |
def filetype : Joined<["--"], "filetype=">, |
| 24 |
HelpText<"Specify the output file type (tbd-v4 or tbd-v5)">; |
| 25 |
def 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 |
// |
| 31 |
def 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 |
// |
| 37 |
def verify_against : Separate<["-"], "verify-against">, |
| 38 |
HelpText<"Verify the specified dynamic library/framework against the headers">; |
| 39 |
def verify_against_EQ : Joined<["--"], "verify-against=">, Alias<verify_against>; |
| 40 |
def verify_mode_EQ : Joined<["--"], "verify-mode=">, |
| 41 |
HelpText<"Specify the severity and extend of the validation. Valid modes are ErrorsOnly, ErrorsAndWarnings, and Pedantic.">; |
| 42 |
def demangle : Flag<["--", "-"], "demangle">, |
| 43 |
HelpText<"Demangle symbols when printing warnings and errors">; |
| 44 |
def dsym: Joined<["--"], "dsym=">, |
| 45 |
MetaVarName<"<path>">, HelpText<"Specify dSYM path for enriched diagnostics.">; |
| 46 |
|
| 47 |
// |
| 48 |
/// Additional input options. |
| 49 |
// |
| 50 |
def extra_project_header : Separate<["-"], "extra-project-header">, |
| 51 |
MetaVarName<"<path>">, |
| 52 |
HelpText<"Add additional project header location for parsing">; |
| 53 |
def extra_project_header_EQ : Joined<["--"], "extra-project-header=">, |
| 54 |
Alias<extra_project_header>; |
| 55 |
def exclude_project_header : Separate<["-"], "exclude-project-header">, |
| 56 |
MetaVarName<"<glob>">, |
| 57 |
HelpText<"Exclude project header from parsing">; |
| 58 |
def exclude_project_header_EQ : Joined<["--"], "exclude-project-header=">, |
| 59 |
Alias<exclude_project_header>; |
| 60 |
def extra_public_header : Separate<["-"], "extra-public-header">, |
| 61 |
MetaVarName<"<path>">, |
| 62 |
HelpText<"Add additional public header location for parsing">; |
| 63 |
def extra_public_header_EQ : Joined<["--"], "extra-public-header=">, |
| 64 |
Alias<extra_public_header>; |
| 65 |
def extra_private_header : Separate<["-"], "extra-private-header">, |
| 66 |
MetaVarName<"<path>">, |
| 67 |
HelpText<"Add additional private header location for parsing">; |
| 68 |
def extra_private_header_EQ : Joined<["--"], "extra-private-header=">, |
| 69 |
Alias<extra_private_header>; |
| 70 |
def exclude_public_header : Separate<["-"], "exclude-public-header">, |
| 71 |
MetaVarName<"<glob>">, |
| 72 |
HelpText<"Exclude public header from parsing">; |
| 73 |
def exclude_public_header_EQ : Joined<["--"], "exclude-public-header=">, |
| 74 |
Alias<exclude_public_header>; |
| 75 |
def exclude_private_header : Separate<["-"], "exclude-private-header">, |
| 76 |
MetaVarName<"<glob>">, |
| 77 |
HelpText<"Exclude private header from parsing">; |
| 78 |
def exclude_private_header_EQ : Joined<["--"], "exclude-private-header=">, |
| 79 |
Alias<exclude_private_header>; |
| 80 |
def public_umbrella_header : Separate<["-"], "public-umbrella-header">, |
| 81 |
MetaVarName<"<path>">, HelpText<"Specify the public umbrella header location">; |
| 82 |
def public_umbrella_header_EQ : Joined<["--"], "public-umbrella-header=">, |
| 83 |
Alias<public_umbrella_header>; |
| 84 |
def private_umbrella_header : Separate<["-"], "private-umbrella-header">, |
| 85 |
MetaVarName<"<path>">, HelpText<"Specify the private umbrella header location">; |
| 86 |
def private_umbrella_header_EQ : Joined<["--"], "private-umbrella-header=">, |
| 87 |
Alias<private_umbrella_header>; |
| 88 |
def project_umbrella_header : Separate<["-"], "project-umbrella-header">, |
| 89 |
MetaVarName<"<path>">, HelpText<"Specify the project umbrella header location">; |
| 90 |
def project_umbrella_header_EQ : Joined<["--"], "project-umbrella-header=">, |
| 91 |
Alias<project_umbrella_header>; |
| 92 |
|
| 93 |
// |
| 94 |
/// X<label> overrides. |
| 95 |
// |
| 96 |
def Xplatform__ : Joined<["-"], "Xplatform_">; |
| 97 |
def Xproject : Joined<["-"], "Xproject">; |
| 98 |
def X__ : Joined<["-"], "X">, |
| 99 |
HelpText<"Pass <arg> to run unique clang invocation identified as <label>">, |
| 100 |
MetaVarName<"<label> <arg>">; |
| 101 |
|
| 102 |
def 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. |
| 111 |
def Xarch__ : Joined<["-"], "Xarch_">; |
| 112 |
def allowable_client : Separate<["-"], "allowable_client">, |
| 113 |
HelpText<"Restricts what can link against the dynamic library being created">; |
| 114 |
def rpath: Separate<["-"], "rpath">, |
| 115 |
HelpText<"Add path to the runpath search path list for the dynamic library being created.">; |
| 116 |
def reexport_l : Joined<["-"], "reexport-l">, |
| 117 |
HelpText<"Re-export the specified library">; |
| 118 |
def reexport_library : Separate<["-"], "reexport_library">, MetaVarName<"<path>">, |
| 119 |
HelpText<"Re-export the specified library">; |
| 120 |
def reexport_framework : Separate<["-"], "reexport_framework">, |
| 121 |
HelpText<"Re-export the specified framework">; |
| 122 |
|
| 123 |
// Xproject supported options. |
| 124 |
def fobjc_arc : Flag<["-"], "fobjc-arc">, |
| 125 |
HelpText<"Synthesize retain and release calls for Objective-C pointers">; |
| 126 |
def include_ : JoinedOrSeparate<["-", "--"], "include">, |
| 127 |
MetaVarName<"<file>">, HelpText<"Include file before parsing, can only be used with -Xproject">; |
| 128 |
def fvisibility_EQ : Joined<["-"], "fvisibility=">, |
| 129 |
HelpText<"Set the default symbol visibility for all global declarations">; |
| 130 |
def fmodules : Flag <["-"], "fmodules">, |
| 131 |
HelpText<"Enable the 'modules' language feature">; |
| 132 |
def fmodules_cache_path : Joined<["-"], "fmodules-cache-path=">, |
| 133 |
MetaVarName<"<directory>">, |
| 134 |
HelpText<"Specify the module cache path">; |
| 135 |
|
| 136 |
// Xplatform supported options. |
| 137 |
def iframework : JoinedOrSeparate<["-"], "iframework">, |
| 138 |
HelpText<"Add directory to SYSTEM framework search path">; |
| 139 |
|
| 140 |
// X<label> prefixes supported options. |
| 141 |
def D : JoinedOrSeparate<["-"], "D">, HelpText<"Define macro">; |
| 142 |
def U : JoinedOrSeparate<["-"], "U">, HelpText<"Undefine macro">; |
| 143 |
|
| 144 |
|