Name Description Size
.clang-tidy 136
.clangd 145
.git-blame-ignore-revs 146
.gitignore 522
.style.yapf 146
3pp
3pp_common
action_helpers.py Helper functions useful when writing scripts used by action() targets. 4037
action_helpers_unittest.py 2657
add_rts_filters.py Creates a dummy RTS filter file if a real ones do not exist yet. Real filter files are generated for suites with skippable tests. Not every test suite will have filter data to use and therefore no filter file will be created. This ensures that a file exists to avoid file not found errors. The files will contain no skippable tests, so there is no effect. Implementation uses try / except because the filter files are written relatively close to when this code creates the dummy files. The following type of implementation would have a race condition: if not os.path.isfile(filter_file): open(filter_file, 'w') as fp: fp.write('*') 1513
android
apple
args
autoroll
build-ctags.sh 1298
BUILD.gn 3888
build_config.h 12984
buildflag.h 1763
buildflag_header.gni 4581
check_gn_headers.py Find header files missing in GN. This script gets all the header files from ninja_deps, which is from the true dependency generated by the compiler, and report if they don't exist in GN. 9628
check_gn_headers_allowlist.txt 9553
check_gn_headers_unittest.py obj/a.o: #deps 1, deps mtime 123 (VALID) ../../a.cc ../../dir/path/b.h ../../c.hh obj/b.o: #deps 1, deps mtime 123 (STALE) ../../b.cc ../../dir2/path/b.h ../../c2.hh obj/c.o: #deps 1, deps mtime 123 (VALID) ../../c.cc ../../build/a.h gen/b.h ../../out/Release/gen/no.h ../../dir3/path/b.h ../../c3.hh 2208
check_gn_headers_whitelist.txt 9701
check_return_value.py This program wraps an arbitrary command and prints "1" if the command ran successfully. 431
chromeos
ciopfs.sha1 40
cipd
clobber.py ninja_required_version = 1.7.2 rule gn command = gn -q gen //out/%s/ description = Regenerating ninja files build build.ninja: gn generator = 1 depfile = build.ninja.d 4513
clobber_unittest.py ninja_required_version = 1.7.2 rule gn command = ../../buildtools/gn --root=../.. -q --regeneration gen . pool = console description = Regenerating ninja files build build.ninja.stamp: gn generator = 1 depfile = build.ninja.d build build.ninja: phony build.ninja.stamp generator = 1 pool build_toolchain_action_pool depth = 72 pool build_toolchain_link_pool depth = 23 subninja toolchain.ninja subninja clang_newlib_x64/toolchain.ninja subninja glibc_x64/toolchain.ninja subninja irt_x64/toolchain.ninja subninja nacl_bootstrap_x64/toolchain.ninja subninja newlib_pnacl/toolchain.ninja build blink_python_tests: phony obj/blink_python_tests.stamp build blink_tests: phony obj/blink_tests.stamp default all 4436
compiled_action.gni 6031
compute_build_timestamp.py Returns a timestamp that approximates the build date. build_type impacts the timestamp generated, both relative to the date of the last recent commit: - default: the build date is set to the most recent first Sunday of a month at 5:00am. The reason is that it is a time where invalidating the build cache shouldn't have major repercussions (due to lower load). - official: the build date is set to the time of the most recent commit. Either way, it is guaranteed to be in the past and always in UTC. 5467
config
copy_test_data_ios.py Copies test data files or directories into a given output directory. 3216
cp.py Copy a file. This module works much like the cp posix command - it takes 2 arguments: (src, dst) and copies the file with path |src| to |dst|. 567
del_ninja_deps_cache.py Delete .ninja_deps if it references files inside a libc++ dir which has since been reverted back to a file, and would cause Ninja fail on Windows. See crbug.com/1337238 1161
DEPS 3245
detect_host_arch.py Outputs host CPU architecture in format recognized by gyp. 1558
dir_exists.py Writes True if the argument is a directory. 544
DIR_METADATA 114
docs
dotfile_settings.gni 2131
download_nacl_toolchains.py Shim to run nacl toolchain download script only if there is a nacl dir. 2018
env_dump.py 1700
extract_from_cab.py Extracts a single file from a CAB archive. 2037
extract_partition.py Extracts an LLD partition from an ELF file. 5058
find_depot_tools.py Small utility function to find depot_tools and add it to the python path. Will throw an ImportError exception if depot_tools can't be found since it imports breakpad. This can also be used as a standalone script to print out the depot_tools directory location. 2185
fix_gn_headers.py Fix header files missing in GN. This script takes the missing header files from check_gn_headers.py, and try to fix them by adding them to the GN files. Manual cleaning up is likely required afterwards. 6632
fuchsia
gdb-add-index 5143
get_landmines.py This file emits the list of reasons why a particular build needs to be clobbered (or a list of 'landmines'). 3920
get_symlink_targets.py Prints the target paths of the given symlinks. Prints out each target in the order that the links were passed in. 691
gn_ast
gn_editor 229
gn_helpers.py Helper functions useful when writing scripts that integrate with GN. The main functions are ToGNString() and FromGNString(), to convert between serialized GN veriables and Python variables. To use in an arbitrary Python file in the build: import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, 'build')) import gn_helpers Where the sequence of parameters to join is the relative path from your source file to the build directory. 18934
gn_helpers_unittest.py [ 1, "two", [ "\\"thr,.\\$\\\\", true, false, [], "($0xE2$0x9C$0x93)" ] ] 12638
gn_logs.gni 1665
gn_run_binary.py Helper script for GN to run an arbitrary binary. See compiled_action.gni. Run with: python gn_run_binary.py <binary_name> [args ...] 1081
install-build-deps-android.sh 1105
install-build-deps.py 27513
install-build-deps.sh 218
install-chroot.sh 31054
internal
ios
lacros
landmine_utils.py Returns a string representing the host_os of the current system. Possible values: 'win', 'mac', 'linux', 'unknown'. 642
landmines.py This script runs every gclient runhooks as the first hook (See DEPS). If it detects that the build should be clobbered, it will delete the contents of the build directory. A landmine is tripped when a builder checks out a different revision, and the diff between the new landmines and the old ones is non-null. At this point, the build is clobbered. Before adding or changing a landmine consider the consequences of doing so. Doing so will wipe out every output directory on every Chrome developer's machine. This can be particularly problematic on Windows where the directory deletion may well fail (locked files, command prompt in the directory, etc.), and generated .sln and .vcxproj files will be deleted. This output directory deletion will be repeated when going back and forth across the change that added the landmine, adding to the cost. There are usually less troublesome alternatives. 5155
linux
locale_tool.py Helper script used to manage locale-related files in Chromium. This script is used to check, and potentially fix, many locale-related files in your Chromium workspace, such as: - GRIT input files (.grd) and the corresponding translations (.xtb). - BUILD.gn files listing Android localized resource string resource .xml generated by GRIT for all supported Chrome locales. These correspond to <output> elements that use the type="android" attribute. The --scan-dir <dir> option can be used to check for all files under a specific directory, and the --fix-inplace option can be used to try fixing any file that doesn't pass the check. This can be very handy to avoid tedious and repetitive work when adding new translations / locales to the Chrome code base, since this script can update said input files for you. Important note: checks and fix may fail on some input files. For example remoting/resources/remoting_strings.grd contains an in-line comment element inside its <outputs> section that breaks the script. The check will fail, and trying to fix it too, but at least the file will not be modified. 50482
mac
mac_toolchain.py If should_use_hermetic_xcode.py emits "1", and the current toolchain is out of date: * Downloads the hermetic mac toolchain * Requires CIPD authentication. Run `cipd auth-login`, use Google account. * Accepts the license. * If xcode-select and xcodebuild are not passwordless in sudoers, requires user interaction. * Downloads standalone binaries from [a possibly different version of Xcode]. The toolchain version can be overridden by setting MAC_TOOLCHAIN_REVISION with the full revision, e.g. 9A235. 7389
metadata.json.in 97
moz-exp-scripts
moz-patch-stack
nocompile.gni 6037
noop.py Script that does nothing successfully. 185
OWNERS 1135
OWNERS.setnoparent 4088
OWNERS.status 338
partitioned_shared_library.gni 6324
precompile.cc 334
precompile.h 1127
PRESUBMIT.py Prevent additions of bad dependencies from the //build prefix. 2034
PRESUBMIT_test.py 1231
print_python_deps.py Prints all non-system dependencies for the given module. The primary use-case for this script is to generate the list of python modules required for .isolate files. 7001
private_code_test
protoc_java.py Generate java source files from protobuf files. This is the action script for the proto_java_library template. It performs the following steps: 1. Deletes all old sources (ensures deleted classes are not part of new jars). 2. Creates source directory. 3. Generates Java files using protoc (output into either --java-out-dir or --srcjar). 4. Creates a new stamp file. 3616
protoc_java.pydeps 246
README.md # About 1651
README.mozilla # Generally, the steps to update the vendored repo are: 3663
README.mozilla.last-vendor 318
redirect_stdout.py 869
rm.py Delete a file. This module works much like the rm posix command. 874
rust
sample_arg_file.gn 222
sanitize-mac-build-log.sed 1100
sanitize-mac-build-log.sh 201
sanitize-win-build-log.sed 465
sanitize-win-build-log.sh 201
shim_headers.gni 1070
skia_gold_common
symlink.gni 2585
symlink.py Make a symlink. 2846
timestamp.gni 1303
toolchain
tree_truth.sh 2843
update-linux-sandbox.sh 2701
util
vs_toolchain.py Returns True if running on a Windows host (including under cygwin). 26491
whitespace_file.txt 8972
win
write_build_date_header.py Takes a timestamp and writes it in as readable text to a .h file. 1121
write_buildflag_header.py 3525
xcode_binaries.yaml 4363
zip_helpers.py Helper functions for dealing with .zip files. 8361
zip_helpers_unittest.py 1755