0
Commit Graph

18 Commits

Author SHA1 Message Date
d76e68103d Update "Debugging Slow Builds" docs
This updates the debugging slow builds docs to give more details about
what NINJA_SUMMARIZE_BUILD=1 does, and how to interpret the weighted
time numbers.

It also adds a mention of tools/buildstate.py, and updates the
instructions for finding build information on the bots.

Bug: None
Change-Id: I3eb6900012a577569c0e123e176221bf8889b768
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4766017
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1181532}
2023-08-09 16:48:03 +00:00
f0c49bde7b writing_gn_templates.md: Mention action_helpers.py and zip_helpers.py
Bug: 1428082
Change-Id: Idd6f49c30e22e68a5f606903382f963d420cea55
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4385435
Reviewed-by: Sam Maier <smaier@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1124874}
2023-03-31 20:13:44 +00:00
6e25f74ea8 Update the Rust documentation with state of the art perspective on Rust
Move to the top level docs, outside of the security subtree, for better
visibility.

R=adetaylor@chromium.org

Bug: 1292073
Change-Id: I7eab0bb83b3a269febc80b2e2f4c6d047157c299
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4051881
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Adrian Taylor <adetaylor@chromium.org>
Auto-Submit: danakj <danakj@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1078295}
2022-12-01 21:47:42 +00:00
d25bfeadb5 Update some //build files to use "main" when appropriate.
Bug: 842296
Change-Id: I43abb04ed32a41f0bca60e9a252b82311a53189f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3997671
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1067400}
2022-11-04 04:48:46 +00:00
583e7b0607 debugging_slow_builds.md: Reorganize and post_build_ninja_summary.py
Change-Id: I7000ba98e052853dccc12dfdc1df52960d5d9abd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3970787
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1064974}
2022-10-28 19:31:36 +00:00
dcf9a56063 writing_gn_templates.md: Fix a missing quotation mark
Change-Id: I0b524ba8fa907151422f41a180f0aa9ae5b3fbc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3747109
Auto-Submit: Tommy Chiang <ototot@google.com>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1021159}
2022-07-06 13:44:03 +00:00
a63952d5b4 [rust] Help IDEs find Rust stdlibs.
gn can inform IDEs such VSCode to find Rust code. With this change,
IDEs are successfully informed of the location of the Rust standard
library.

This is a breaking change for gn args, in the case that you're using
an external Rust toolchain. Previously you needed to specify
rust_bin_dir; now you need to specify rust_sysroot_absolute, pointing
to the parent directory of whatever you previously specified.
It also removes the redundant 'use_unverified_rust_toolchain' Boolean
argument.

The DEPS change here is to absorb a revised CIPD package of the Rust
toolchain which has slightly different source code layout.

Bug: 1269992
Change-Id: Ieae64344f4f7589f75a53ad2d4e83d4a12b6305a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3280458
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Adrian Taylor <adetaylor@chromium.org>
Cr-Commit-Position: refs/heads/main@{#946561}
2021-11-30 18:49:22 +00:00
21dcb365c1 [rust] Introduce Rust Android toolchain.
This provides the ability to add Rust components to Chromium.  This is
experimental and won't affect production Chromium.  This is the most
minimal possible addition: future CLs will handle more tooling, ability
to add third party crates, C++ interop etc.

Specifically, this CL contains:
* Global gn flags to enable Rust compilation (off by default) and to
  enable contribution of Rust code into Chrome binaries (off by
  default; currently unused anyway)
* Modifications to three gn toolchains (clang, Windows and Mac) to
  trigger gn's built-in support for Rust tool invocations
* Reasonable default Rust compiler flags for various cases where we
  set up C++ compiler flags (e.g. optimization, debug info)
* Some test binaries, built by default.
* Support for our existing C++ linker invocations to link Rust code into
  their output binaries (more discussion below).

More on this last point. The Rust compiler (rustc) knows how to make
several different products - executables, shared objects, 'complete'
static libraries, and 'rlibs'. 'Complete' static libraries contain
everything required to link Rust code into non-Rust binaries, including
(for instance) the required parts of the Rust standard library. That
would be fine if we only ever expected a single Rust subsystem in
Chrome. But as we expect (eventually) several, we instead choose to
generate 'rlibs' and pass them into our C++ linker commands.  (To link
multiple staticlibs would give us ODR violations on the Rust stdlib.)
'rlibs' are 'incomplete' and thus we have to take extra steps to include
the Rust standard library - that's in //build/rust std.

Change-Id: Ie0342bde51852ddc049e8d6a7950897b779904d2
Bug: 1069271
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2162136
Reviewed-by: Alex Gough <ajgo@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Adrian Taylor <adetaylor@chromium.org>
Cr-Commit-Position: refs/heads/main@{#917242}
2021-09-01 14:58:14 +00:00
07769a49c1 writing_gn_templates.gn: Rationale for not listing outputs
Change-Id: I86c9a5a75ca66c39fdc86d1348eac21f0350ad31
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2867311
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Sam Maier <smaier@chromium.org>
Commit-Queue: Sam Maier <smaier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#878565}
2021-05-03 20:58:21 +00:00
b1b2ae0a06 writing_gn_templates.md: Elaborate on restat=1
TBR=agrieve  # Minor docs change

Change-Id: I1b85dfff5aee660768c15f4ea031b1f854bbbd77
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2561049
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831230}
2020-11-26 03:06:45 +00:00
1b290e4a22 Improve GN templates use of "visibility" and "testonly"
Many spots using forward_variables_from(invoker, "*") were not
allowing these two variables to be set in outer scopes.

* Introduce a helper variable "EXPLICIT_FORWARDS" for use with the
recommended pattern of:
  forward_variables_from(invoker, "*", [ "testonly", "visibility" ])
  forward_variables_from(invoker, [ "testonly", "visibility" ])
* Ensures this pattern is used in android templates, test.gni,
  and BUILDCONFIG.gn
* Documents this pattern in writing_gn_templates.md
* Adds a PRESUBMIT.py for it
* Fixes visibility of a few blink targets now that test()
  respects it.

Bug: 862232
Change-Id: Ib71dbf34be76131fc749c721aea856e1146bc69a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2454427
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/master@{#830678}
2020-11-24 20:07:01 +00:00
e7644d503a writing_gn_templates.md: Clarify *why* __suffix is beneficial
TBR=minor doc update

Change-Id: I8d02a5b686009d45ba5fa9033f221157247b0101
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2541910
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827888}
2020-11-16 21:17:51 +00:00
69067c7e53 Delete old package_mac_toolchain.py script
Change-Id: Ib538e21dd36b570265aa8ec27f85a515c573b13e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2203542
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#769346}
2020-05-15 18:15:50 +00:00
13c4c2ab78 writing_gn_templates.md: target_gen_dir vs target_out_dir
Change-Id: I67fac22fa506e1cd3bd46d003887621e08b146cd
Reviewed-on: https://chromium-review.googlesource.com/c/1349502
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611129}
2018-11-27 16:07:55 +00:00
e48b57b8bb writing_gn_templates.md: s/leaves/roots/
Follow-up from original review.

Change-Id: I375b2f266d3712f20efc769fc822df67701297a3
Reviewed-on: https://chromium-review.googlesource.com/1246836
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Eric Stevenson <estevenson@chromium.org>
Commit-Queue: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594462}
2018-09-26 20:36:28 +00:00
bd10a663af Docs for //build: README.md, writing_gn_templates.md, debugging_slow_builds.md
Change-Id: Idf2cc4fe806b1dacde38f3bcda94b0e7d8b66c00
Reviewed-on: https://chromium-review.googlesource.com/1214757
Commit-Queue: agrieve <agrieve@chromium.org>
Reviewed-by: David Turner <digit@chromium.org>
Reviewed-by: Eric Stevenson <estevenson@chromium.org>
Reviewed-by: Tibor Goldschwendt <tiborg@chromium.org>
Reviewed-by: Christopher Grant <cjgrant@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591251}
2018-09-14 01:19:59 +00:00
96dfe4d804 build: Fix common misspellings
Bug: 750830
Change-Id: Ie4cc9f02e3cc23f0ed3e44b5372745eee9944165
Reviewed-on: https://chromium-review.googlesource.com/594770
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Julien Brianceau <jbriance@cisco.com>
Cr-Commit-Position: refs/heads/master@{#490922}
2017-08-01 09:03:13 +00:00
ae73b40100 Add markdown instructions for using hermetic toolchain on mac and ios.
BUG=669094

Review-Url: https://codereview.chromium.org/2606223003
Cr-Commit-Position: refs/heads/master@{#446039}
2017-01-25 16:56:44 +00:00