extra_actions_base.proto 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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. syntax = "proto2";
  17. package blaze;
  18. option java_multiple_files = true;
  19. option java_package = "com.google.devtools.build.lib.actions.extra";
  20. // option cc_api_version = 2;
  21. // option java_api_version = 2;
  22. // A list of extra actions and metadata for the print_action command.
  23. message ExtraActionSummary {
  24. repeated DetailedExtraActionInfo action = 1;
  25. }
  26. // An individual action printed by the print_action command.
  27. message DetailedExtraActionInfo {
  28. // If the given action was included in the output due to a request for a
  29. // specific file, then this field contains the name of that file so that the
  30. // caller can correctly associate the extra action with that file.
  31. //
  32. // The data in this message is currently not sufficient to run the action on a
  33. // production machine, because not all necessary input files are identified,
  34. // especially for C++.
  35. //
  36. // There is no easy way to fix this; we could require that all header files
  37. // are declared and then add all of them here (which would be a huge superset
  38. // of the files that are actually required), or we could run the include
  39. // scanner and add those files here.
  40. optional string triggering_file = 1;
  41. // The actual action.
  42. required ExtraActionInfo action = 2;
  43. }
  44. // Provides information to an extra_action on the original action it is
  45. // shadowing.
  46. message ExtraActionInfo {
  47. extensions 1000 to max;
  48. // The label of the ActionOwner of the shadowed action.
  49. optional string owner = 1;
  50. // Only set if the owner is an Aspect.
  51. // Corresponds to AspectValue.AspectKey.getAspectClass.getName()
  52. // This field is deprecated as there might now be
  53. // multiple aspects applied to the same target.
  54. // This is the aspect name of the last aspect
  55. // in 'aspects' (8) field.
  56. optional string aspect_name = 6 [deprecated = true];
  57. // Only set if the owner is an Aspect.
  58. // Corresponds to AspectValue.AspectKey.getParameters()
  59. // This field is deprecated as there might now be
  60. // multiple aspects applied to the same target.
  61. // These are the aspect parameters of the last aspect
  62. // in 'aspects' (8) field.
  63. map<string, StringList> aspect_parameters = 7 [deprecated = true];
  64. message StringList {
  65. option deprecated = true;
  66. repeated string value = 1;
  67. }
  68. message AspectDescriptor {
  69. // Corresponds to AspectDescriptor.getName()
  70. optional string aspect_name = 1;
  71. // Corresponds to AspectDescriptor.getParameters()
  72. map<string, StringList> aspect_parameters = 2;
  73. message StringList {
  74. repeated string value = 1;
  75. }
  76. }
  77. // If the owner is an aspect, all aspects applied to the target
  78. repeated AspectDescriptor aspects = 8;
  79. // An id uniquely describing the shadowed action at the ActionOwner level.
  80. optional string id = 2;
  81. // The mnemonic of the shadowed action. Used to distinguish actions with the
  82. // same ActionType.
  83. optional string mnemonic = 5;
  84. }
  85. message EnvironmentVariable {
  86. // It is possible that this name is not a valid variable identifier.
  87. required string name = 1;
  88. // The value is unescaped and unquoted.
  89. required string value = 2;
  90. }
  91. // Provides access to data that is specific to spawn actions.
  92. // Usually provided by actions using the "Spawn" & "Genrule" Mnemonics.
  93. message SpawnInfo {
  94. extend ExtraActionInfo {
  95. optional SpawnInfo spawn_info = 1003;
  96. }
  97. repeated string argument = 1;
  98. // A list of environment variables and their values. No order is enforced.
  99. repeated EnvironmentVariable variable = 2;
  100. repeated string input_file = 4;
  101. repeated string output_file = 5;
  102. }
  103. // Provides access to data that is specific to C++ compile actions.
  104. // Usually provided by actions using the "CppCompile" Mnemonic.
  105. message CppCompileInfo {
  106. extend ExtraActionInfo {
  107. optional CppCompileInfo cpp_compile_info = 1001;
  108. }
  109. optional string tool = 1;
  110. repeated string compiler_option = 2;
  111. optional string source_file = 3;
  112. optional string output_file = 4;
  113. // Due to header discovery, this won't include headers unless the build is
  114. // actually performed. If set, this field will include the value of
  115. // "source_file" in addition to the headers.
  116. repeated string sources_and_headers = 5;
  117. // A list of environment variables and their values. No order is enforced.
  118. repeated EnvironmentVariable variable = 6;
  119. }
  120. // Provides access to data that is specific to C++ link actions.
  121. // Usually provided by actions using the "CppLink" Mnemonic.
  122. message CppLinkInfo {
  123. extend ExtraActionInfo {
  124. optional CppLinkInfo cpp_link_info = 1002;
  125. }
  126. repeated string input_file = 1;
  127. optional string output_file = 2;
  128. optional string interface_output_file = 3;
  129. optional string link_target_type = 4;
  130. optional string link_staticness = 5;
  131. repeated string link_stamp = 6;
  132. repeated string build_info_header_artifact = 7;
  133. // The list of command line options used for running the linking tool.
  134. repeated string link_opt = 8;
  135. }
  136. // Provides access to data that is specific to java compile actions.
  137. // Usually provided by actions using the "Javac" Mnemonic.
  138. message JavaCompileInfo {
  139. extend ExtraActionInfo {
  140. optional JavaCompileInfo java_compile_info = 1000;
  141. }
  142. optional string outputjar = 1;
  143. repeated string classpath = 2;
  144. repeated string sourcepath = 3;
  145. repeated string source_file = 4;
  146. repeated string javac_opt = 5;
  147. repeated string processor = 6;
  148. repeated string processorpath = 7;
  149. repeated string bootclasspath = 8;
  150. repeated string argument = 9;
  151. }
  152. // Provides access to data that is specific to python rules.
  153. // Usually provided by actions using the "Python" Mnemonic.
  154. message PythonInfo {
  155. extend ExtraActionInfo {
  156. optional PythonInfo python_info = 1005;
  157. }
  158. repeated string source_file = 1;
  159. repeated string dep_file = 2;
  160. }