tree: 12332c7677de08ce307aa09b542a2e1fd6428021 [path history] [tgz]
  1. BUILD.gn
  2. OWNERS
  3. README.md
  4. action_target_generator.cc
  5. action_target_generator.h
  6. action_target_generator_unittest.cc
  7. action_values.cc
  8. action_values.h
  9. args.cc
  10. args.h
  11. args_unittest.cc
  12. bin/
  13. binary_target_generator.cc
  14. binary_target_generator.h
  15. bootstrap/
  16. build_settings.cc
  17. build_settings.h
  18. builder.cc
  19. builder.h
  20. builder_record.cc
  21. builder_record.h
  22. builder_unittest.cc
  23. c_include_iterator.cc
  24. c_include_iterator.h
  25. c_include_iterator_unittest.cc
  26. command_args.cc
  27. command_check.cc
  28. command_clean.cc
  29. command_desc.cc
  30. command_format.cc
  31. command_format_unittest.cc
  32. command_gen.cc
  33. command_help.cc
  34. command_ls.cc
  35. command_path.cc
  36. command_refs.cc
  37. commands.cc
  38. commands.h
  39. config.cc
  40. config.h
  41. config_unittest.cc
  42. config_values.cc
  43. config_values.h
  44. config_values_extractors.cc
  45. config_values_extractors.h
  46. config_values_extractors_unittest.cc
  47. config_values_generator.cc
  48. config_values_generator.h
  49. copy_target_generator.cc
  50. copy_target_generator.h
  51. deps_iterator.cc
  52. deps_iterator.h
  53. docs/
  54. err.cc
  55. err.h
  56. escape.cc
  57. escape.h
  58. escape_unittest.cc
  59. example/
  60. exec_process.cc
  61. exec_process.h
  62. exec_process_unittest.cc
  63. filesystem_utils.cc
  64. filesystem_utils.h
  65. filesystem_utils_unittest.cc
  66. format_test_data/
  67. function_exec_script.cc
  68. function_foreach.cc
  69. function_foreach_unittest.cc
  70. function_forward_variables_from.cc
  71. function_forward_variables_from_unittest.cc
  72. function_get_label_info.cc
  73. function_get_label_info_unittest.cc
  74. function_get_path_info.cc
  75. function_get_path_info_unittest.cc
  76. function_get_target_outputs.cc
  77. function_get_target_outputs_unittest.cc
  78. function_process_file_template.cc
  79. function_process_file_template_unittest.cc
  80. function_read_file.cc
  81. function_rebase_path.cc
  82. function_rebase_path_unittest.cc
  83. function_set_default_toolchain.cc
  84. function_set_defaults.cc
  85. function_template.cc
  86. function_toolchain.cc
  87. function_write_file.cc
  88. function_write_file_unittest.cc
  89. functions.cc
  90. functions.h
  91. functions_target.cc
  92. functions_target_unittest.cc
  93. functions_unittest.cc
  94. gn.gyp
  95. gn_main.cc
  96. gn_unittests.isolate
  97. group_target_generator.cc
  98. group_target_generator.h
  99. header_checker.cc
  100. header_checker.h
  101. header_checker_unittest.cc
  102. import_manager.cc
  103. import_manager.h
  104. inherited_libraries.cc
  105. inherited_libraries.h
  106. inherited_libraries_unittest.cc
  107. input_conversion.cc
  108. input_conversion.h
  109. input_conversion_unittest.cc
  110. input_file.cc
  111. input_file.h
  112. input_file_manager.cc
  113. input_file_manager.h
  114. item.cc
  115. item.h
  116. label.cc
  117. label.h
  118. label_pattern.cc
  119. label_pattern.h
  120. label_pattern_unittest.cc
  121. label_ptr.h
  122. label_unittest.cc
  123. last_commit_position.py
  124. lib_file.cc
  125. lib_file.h
  126. loader.cc
  127. loader.h
  128. loader_unittest.cc
  129. location.cc
  130. location.h
  131. misc/
  132. ninja_action_target_writer.cc
  133. ninja_action_target_writer.h
  134. ninja_action_target_writer_unittest.cc
  135. ninja_binary_target_writer.cc
  136. ninja_binary_target_writer.h
  137. ninja_binary_target_writer_unittest.cc
  138. ninja_build_writer.cc
  139. ninja_build_writer.h
  140. ninja_copy_target_writer.cc
  141. ninja_copy_target_writer.h
  142. ninja_copy_target_writer_unittest.cc
  143. ninja_group_target_writer.cc
  144. ninja_group_target_writer.h
  145. ninja_group_target_writer_unittest.cc
  146. ninja_target_writer.cc
  147. ninja_target_writer.h
  148. ninja_target_writer_unittest.cc
  149. ninja_toolchain_writer.cc
  150. ninja_toolchain_writer.h
  151. ninja_toolchain_writer_unittest.cc
  152. ninja_utils.cc
  153. ninja_utils.h
  154. ninja_writer.cc
  155. ninja_writer.h
  156. operators.cc
  157. operators.h
  158. operators_unittest.cc
  159. ordered_set.h
  160. output_file.cc
  161. output_file.h
  162. parse_tree.cc
  163. parse_tree.h
  164. parse_tree_unittest.cc
  165. parser.cc
  166. parser.h
  167. parser_unittest.cc
  168. path_output.cc
  169. path_output.h
  170. path_output_unittest.cc
  171. pattern.cc
  172. pattern.h
  173. pattern_unittest.cc
  174. runtime_deps.cc
  175. runtime_deps.h
  176. runtime_deps_unittest.cc
  177. scheduler.cc
  178. scheduler.h
  179. scope.cc
  180. scope.h
  181. scope_per_file_provider.cc
  182. scope_per_file_provider.h
  183. scope_per_file_provider_unittest.cc
  184. scope_unittest.cc
  185. settings.cc
  186. settings.h
  187. setup.cc
  188. setup.h
  189. source_dir.cc
  190. source_dir.h
  191. source_dir_unittest.cc
  192. source_file.cc
  193. source_file.h
  194. source_file_type.cc
  195. source_file_type.h
  196. source_file_unittest.cc
  197. standard_out.cc
  198. standard_out.h
  199. string_utils.cc
  200. string_utils.h
  201. string_utils_unittest.cc
  202. substitution_list.cc
  203. substitution_list.h
  204. substitution_pattern.cc
  205. substitution_pattern.h
  206. substitution_pattern_unittest.cc
  207. substitution_type.cc
  208. substitution_type.h
  209. substitution_writer.cc
  210. substitution_writer.h
  211. substitution_writer_unittest.cc
  212. switches.cc
  213. switches.h
  214. target.cc
  215. target.h
  216. target_generator.cc
  217. target_generator.h
  218. target_unittest.cc
  219. template.cc
  220. template.h
  221. template_unittest.cc
  222. test_with_scope.cc
  223. test_with_scope.h
  224. token.cc
  225. token.h
  226. tokenizer.cc
  227. tokenizer.h
  228. tokenizer_unittest.cc
  229. tool.cc
  230. tool.h
  231. toolchain.cc
  232. toolchain.h
  233. trace.cc
  234. trace.h
  235. tutorial/
  236. unique_vector.h
  237. unique_vector_unittest.cc
  238. value.cc
  239. value.h
  240. value_extractors.cc
  241. value_extractors.h
  242. value_unittest.cc
  243. variables.cc
  244. variables.h
  245. visibility.cc
  246. visibility.h
  247. visibility_unittest.cc
  248. visual_studio_utils.cc
  249. visual_studio_utils.h
  250. visual_studio_utils_unittest.cc
  251. visual_studio_writer.cc
  252. visual_studio_writer.h
  253. visual_studio_writer_unittest.cc
  254. xml_element_writer.cc
  255. xml_element_writer.h
  256. xml_element_writer_unittest.cc
tools/gn/README.md

What is GN?

GN is a meta-build system that generates NinjaBuild files. It's meant to be faster and simpler than GYP. It outputs only Ninja build files.

Why bother with GN?

  1. We believe GN files are more readable and more maintainable than GYP files.
  2. GN is fast:
  • GN is 20x faster than GYP.
  • GN supports automatically re-running itself as needed by Ninja as part of the build. This eliminates the need to remember to re-run GN when you change a build file.
  1. GN gives us better tools for enforcing dependencies (see gn check and the visibility, public_deps, and data_deps options for some examples).
  2. GN gives us tools for querying the build graph; you can ask “what does X depend on” and “who depends on Y”, for example.

What's the status?

as of 7 Oct 2015:

GN is now the default system for Linux, though GYP still works. It is mostly complete on Android, ChromeOS, and Windows (apart from NaCl support on Windows).

Mac and iOS are making progress, though we still need better support for bundles before the major targets like Chrome can link and they get to parity w/ the other platforms.

When are you going to be done?

as of 7 Oct 2015:

We're currently shooting for having Android, ChromeOS, and Windows converted over by the end of 2015, with Mac and iOS following in Q1 of 2016.

What does “done” mean?

Ideally we're done when all of the GYP files have been deleted from Chromium and no one misses them.

We will be “mostly” done when the following are true:

  • All of the bots maintained by the Chrome infra team for Chromium and downstream of Chromium have been switched to GN. (Upstream projects like Skia and V8 can choose to stay on GYP if they like).
  • Any developer configurations we care about that don‘t have bots also work (Generally speaking, we’re aiming to not have any of these.
  • Configurations we care about should have bots to ensure they don't break). We have verified that all of the tests pass. We have verified that the command lines match in the above configurations as much as possible, and we accept any differences. We have reviewed any binary differences that result in the official builds and accepted them. The GN files are the “source of truth” for the build, and normal chromium developers normally do not need to touch GYP files to keep things working. We have replacements for the hybrid “msvs-ninja” and “xcode-ninja” configurations that GYP can currently build.

The difference between “mostly done” and “done” exists to cover any issues we haven't yet identified :)

We do not currently plan to support full native XCode or Visual Studio generation from GN. It is theoretically possible to support such things, so we would at least look at patches adding the functionality.

How can I help?

Check to see if your targets build under GN yet. If they don't, volunteer to help convert them!

Or, look at the list of open bugs related to the migration and see if there's anything that catches your fancy.

I want more info on GN!

Read these links: