Files
leoca baec853a93 [tools] Fix invalid escape sequence warnings in Python scripts
Running tools/run_perf.py or the presubmit with Python 3.12 prints
"SyntaxWarning: invalid escape sequence" for regexes written as plain
string literals, the same problem crrev.com/c/7580173 fixed in
test/benchmarks/csuite/benchmark.py. Compiling every tracked .py file
with warnings enabled still reports 29 such escapes in 14 files, and
Python has announced that they will eventually become a SyntaxError.

This turns them into raw strings. In sancov_formatter.py the literals
also contained \' so they become double-quoted raw strings, and in
mb_test.py the Windows path only gets its remaining backslashes doubled.

Nothing should change at runtime. I compared the AST of each file
before and after: all string values are identical except four patterns
in v8_presubmit.py where "\n" becomes r"\n", and those compile to the
same regex bytecode. After the change no tracked .py file emits a
SyntaxWarning.

AI tools used

Change-Id: If33347a100847ac0d7506206bf909662b0258524
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8400127
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#109806}
2026-09-14 03:21:32 -07:00
..
2026-07-13 01:44:42 -07:00
2016-09-01 12:20:20 +00:00
2016-09-01 12:20:20 +00:00
2016-09-01 12:20:20 +00:00

MB - The Meta-Build wrapper

MB is a simple wrapper intended to provide a uniform interface to either GYP or GN, such that users and bots can call one script and not need to worry about whether a given bot is meant to use GN or GYP.

It supports two main functions:

  1. "gen" - the main gyp_chromium / gn gen invocation that generates the Ninja files needed for the build.

  2. "analyze" - the step that takes a list of modified files and a list of desired targets and reports which targets will need to be rebuilt.

We also use MB as a forcing function to collect all of the different build configurations that we actually support for Chromium builds into one place, in //tools/mb/mb_config.pyl.

For more information, see: