kythe.io@v0.0.68-0.20240422202219-7225dbc01741/third_party/bazel/src/main/protobuf/extra_actions_base.proto (about) 1 // Copyright 2014 The Bazel Authors. All rights reserved. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 // 15 // proto definitions for the blaze extra_action feature. 16 17 syntax = "proto2"; 18 19 package blaze; 20 21 option java_multiple_files = true; 22 option java_package = "com.google.devtools.build.lib.actions.extra"; 23 // option cc_api_version = 2; 24 // option java_api_version = 2; 25 26 // A list of extra actions and metadata for the print_action command. 27 message ExtraActionSummary { 28 repeated DetailedExtraActionInfo action = 1; 29 } 30 31 // An individual action printed by the print_action command. 32 message DetailedExtraActionInfo { 33 // If the given action was included in the output due to a request for a 34 // specific file, then this field contains the name of that file so that the 35 // caller can correctly associate the extra action with that file. 36 // 37 // The data in this message is currently not sufficient to run the action on a 38 // production machine, because not all necessary input files are identified, 39 // especially for C++. 40 // 41 // There is no easy way to fix this; we could require that all header files 42 // are declared and then add all of them here (which would be a huge superset 43 // of the files that are actually required), or we could run the include 44 // scanner and add those files here. 45 optional string triggering_file = 1; 46 // The actual action. 47 required ExtraActionInfo action = 2; 48 } 49 50 // Provides information to an extra_action on the original action it is 51 // shadowing. 52 message ExtraActionInfo { 53 extensions 1000 to max; 54 55 // The label of the ActionOwner of the shadowed action. 56 optional string owner = 1; 57 58 // Only set if the owner is an Aspect. 59 // Corresponds to AspectValue.AspectKey.getAspectClass.getName() 60 // This field is deprecated as there might now be 61 // multiple aspects applied to the same target. 62 // This is the aspect name of the last aspect 63 // in 'aspects' (8) field. 64 optional string aspect_name = 6 [deprecated = true]; 65 66 // Only set if the owner is an Aspect. 67 // Corresponds to AspectValue.AspectKey.getParameters() 68 // This field is deprecated as there might now be 69 // multiple aspects applied to the same target. 70 // These are the aspect parameters of the last aspect 71 // in 'aspects' (8) field. 72 map<string, StringList> aspect_parameters = 7 [deprecated = true]; 73 message StringList { 74 option deprecated = true; 75 repeated string value = 1; 76 } 77 78 message AspectDescriptor { 79 // Corresponds to AspectDescriptor.getName() 80 optional string aspect_name = 1; 81 // Corresponds to AspectDescriptor.getParameters() 82 map<string, StringList> aspect_parameters = 2; 83 message StringList { 84 repeated string value = 1; 85 } 86 } 87 88 // If the owner is an aspect, all aspects applied to the target 89 repeated AspectDescriptor aspects = 8; 90 91 // An id uniquely describing the shadowed action at the ActionOwner level. 92 optional string id = 2; 93 94 // The mnemonic of the shadowed action. Used to distinguish actions with the 95 // same ActionType. 96 optional string mnemonic = 5; 97 } 98 99 message EnvironmentVariable { 100 // It is possible that this name is not a valid variable identifier. 101 required string name = 1; 102 // The value is unescaped and unquoted. 103 required string value = 2; 104 } 105 106 // Provides access to data that is specific to spawn actions. 107 // Usually provided by actions using the "Spawn" & "Genrule" Mnemonics. 108 message SpawnInfo { 109 extend ExtraActionInfo { 110 optional SpawnInfo spawn_info = 1003; 111 } 112 113 repeated string argument = 1; 114 // A list of environment variables and their values. No order is enforced. 115 repeated EnvironmentVariable variable = 2; 116 repeated string input_file = 4; 117 repeated string output_file = 5; 118 } 119 120 // Provides access to data that is specific to C++ compile actions. 121 // Usually provided by actions using the "CppCompile" Mnemonic. 122 message CppCompileInfo { 123 extend ExtraActionInfo { 124 optional CppCompileInfo cpp_compile_info = 1001; 125 } 126 127 optional string tool = 1; 128 repeated string compiler_option = 2; 129 optional string source_file = 3; 130 optional string output_file = 4; 131 // Due to header discovery, this won't include headers unless the build is 132 // actually performed. If set, this field will include the value of 133 // "source_file" in addition to the headers. 134 repeated string sources_and_headers = 5; 135 // A list of environment variables and their values. No order is enforced. 136 repeated EnvironmentVariable variable = 6; 137 } 138 139 // Provides access to data that is specific to C++ link actions. 140 // Usually provided by actions using the "CppLink" Mnemonic. 141 message CppLinkInfo { 142 extend ExtraActionInfo { 143 optional CppLinkInfo cpp_link_info = 1002; 144 } 145 146 repeated string input_file = 1; 147 optional string output_file = 2; 148 optional string interface_output_file = 3; 149 optional string link_target_type = 4; 150 optional string link_staticness = 5; 151 repeated string link_stamp = 6; 152 repeated string build_info_header_artifact = 7; 153 // The list of command line options used for running the linking tool. 154 repeated string link_opt = 8; 155 } 156 157 // Provides access to data that is specific to java compile actions. 158 // Usually provided by actions using the "Javac" Mnemonic. 159 message JavaCompileInfo { 160 extend ExtraActionInfo { 161 optional JavaCompileInfo java_compile_info = 1000; 162 } 163 164 optional string outputjar = 1; 165 repeated string classpath = 2; 166 repeated string sourcepath = 3; 167 repeated string source_file = 4; 168 repeated string javac_opt = 5; 169 repeated string processor = 6; 170 repeated string processorpath = 7; 171 repeated string bootclasspath = 8; 172 repeated string argument = 9; 173 optional string system = 10; 174 } 175 176 // Provides access to data that is specific to python rules. 177 // Usually provided by actions using the "Python" Mnemonic. 178 message PythonInfo { 179 extend ExtraActionInfo { 180 optional PythonInfo python_info = 1005; 181 } 182 183 repeated string source_file = 1; 184 repeated string dep_file = 2; 185 }