Disable AccessibilityAriaGrabbed due to flakiness
[chromium-blink-merge.git] / tools / gn / README.txt
blobb457ccc62185139fdc9057eeeba6c2cf057a788d
1 GN "Generate Ninja"
3 GN is a meta-build system that generates ninja files. It's meant to be faster
4 and simpler than GYP.
6 Chromium uses binary versions of GN downloaded from Google Cloud Storage during
7 gclient runhooks, so that we don't have to worry about bootstrapping a build
8 of GN from scratch.
10 In order to make changes to GN and update the binaries, you must
11 have access to the "chromium-gn" bucket in Google Cloud Storage.  To date,
12 only a few Googlers have this access; if you don't have it, ask someone
13 who does for help :).
15 Assuming you have access to the bucket, do the following:
17 1) Make the changes to the GN source.
19 2) Upload a patch.
21 3) Get it reviewed and landed.
23 4) Obtain local build machines (with Chromium checkouts with your change)
24    for Mac, Windows, and 32-bit and 64-bit Linux environments.
26    On Linux, make sure you have the debian sysroots needed to do proper builds:
27    For 32-bits:
28    % export GYP_DEFINES="branding=Chrome buildtype=Official target_arch=ia32"
29    For 64-bits:
30    % export GYP_DEFINES="branding=Chrome buildtype=Official target_arch=x64"
31    Then:
32    % gclient runhooks
34 5) Sync each checkout to the revision of Chromium containing your change (or
35    a suitable later one).
37 6) Ensure that you have initialized the gsutil credentials as described in
38    buildtools/README.txt . The username should be the one that is on the ACL
39    for the "chromium-gn" bucket (probably your @google.com address).
40    Contact the build team for help getting access if necessary.
42 7) Run the checked-in GN binary to create a new build directory. Use the args
43    specified in the buildtools/*/gn_args.txt files:
45    On Linux:
46    % gn gen //out/Release_gn_rel32 --args="<flags from buildtools/linux32/gn_args.txt>"
47    % ninja -C out/Release_gn_rel32 gn
48    % cp out/Release_gn_rel32/gn buildtools/linux32
49    % buildtools/linux32/upload_gn
50    % gn gen //out/Release_gn_rel64 --args="<flags from buildtools/linux32/gn_args.txt>"
51    % ninja -C out/Release_gn_rel64 gn
52    % cp out/Release_gn_rel64/gn buildtools/linux64
53    % buildtools/linux64/upload_gn
55    On Mac:
56    % gn gen //out/Release_gn_rel --args="<flags from buildtools/mac/gn_args.txt>"
57    % ninja -C out/Release_gn_rel gn
58    % cp out/Release_gn_rel/gn buildtools/mac/
59    % buildtools/mac/upload_gn
61    On Win:
62    > gn gen //out/Release_gn_rel --args="<flags from buildtools/win/gn_args.txt>"
63    > ninja -C out\Release_gn_rel gn
64    > copy out\Release_gn_rel\gn.exe buildtools\win
65    > buildtools\win\upload_gn.bat
67 7) The uploads in the previous step will produce updated .sha1 files in
68    src/buildtools/*/*.sha1 . Those hashes need to be uploaded, reviewed,
69    and committed into the buildtools repo.
71 8) Once buildtools has been uploaded, roll the new version of buildtools/
72    back into chrome via src/DEPS.