[infra] Update rpmalloc revision The recipe was broken when using rpmalloc (i.e. when building for Linux only) because Clang was updated to version 16, and that compiler now complains of unsafe buffer usage when -Weverything is used. The fix does: - Update the rpmalloc revision to a more recent revision, which includes fixes for a previous warning issue. See [1] in particular. - Add a -Wno-unsafe-buffer-usage compiler flag to ensure the library can be compiled. [1] https://github.com/mjansson/rpmalloc/commit/f4732ee2b8a5a838cf52cfcd6bc4a44bdc084ef2 Bug: None Change-Id: Ie6233d41d8657b073bcb9f79e9cbd0e4aa30b652 Reviewed-on: https://gn-review.googlesource.com/c/gn/+/15021 Reviewed-by: Brett Wilson <brettw@chromium.org>
diff --git a/infra/recipes/gn.expected/ci_linux.json b/infra/recipes/gn.expected/ci_linux.json index 5c09522..27e7b3f 100644 --- a/infra/recipes/gn.expected/ci_linux.json +++ b/infra/recipes/gn.expected/ci_linux.json
@@ -213,7 +213,7 @@ "cmd": [ "git", "checkout", - "b097fd0916500439721a114bb9cd8d14bd998683" + "668a7f81b588a985c6528b70674dbcc005d9cb75" ], "cwd": "[START_DIR]/rpmalloc", "infra_step": true,
diff --git a/infra/recipes/gn.expected/cipd_exists.json b/infra/recipes/gn.expected/cipd_exists.json index c2a1553..64c1fb5 100644 --- a/infra/recipes/gn.expected/cipd_exists.json +++ b/infra/recipes/gn.expected/cipd_exists.json
@@ -213,7 +213,7 @@ "cmd": [ "git", "checkout", - "b097fd0916500439721a114bb9cd8d14bd998683" + "668a7f81b588a985c6528b70674dbcc005d9cb75" ], "cwd": "[START_DIR]/rpmalloc", "infra_step": true,
diff --git a/infra/recipes/gn.expected/cipd_register.json b/infra/recipes/gn.expected/cipd_register.json index b877dc1..650b9da 100644 --- a/infra/recipes/gn.expected/cipd_register.json +++ b/infra/recipes/gn.expected/cipd_register.json
@@ -213,7 +213,7 @@ "cmd": [ "git", "checkout", - "b097fd0916500439721a114bb9cd8d14bd998683" + "668a7f81b588a985c6528b70674dbcc005d9cb75" ], "cwd": "[START_DIR]/rpmalloc", "infra_step": true,
diff --git a/infra/recipes/gn.expected/cq_linux.json b/infra/recipes/gn.expected/cq_linux.json index 9bbd7d3..1259594 100644 --- a/infra/recipes/gn.expected/cq_linux.json +++ b/infra/recipes/gn.expected/cq_linux.json
@@ -264,7 +264,7 @@ "cmd": [ "git", "checkout", - "b097fd0916500439721a114bb9cd8d14bd998683" + "668a7f81b588a985c6528b70674dbcc005d9cb75" ], "cwd": "[START_DIR]/rpmalloc", "infra_step": true,
diff --git a/infra/recipes/gn.py b/infra/recipes/gn.py index a4277dc..7cb6229 100644 --- a/infra/recipes/gn.py +++ b/infra/recipes/gn.py
@@ -29,7 +29,7 @@ # On select platforms, link the GN executable against rpmalloc for a small 10% speed boost. RPMALLOC_GIT_URL = 'https://fuchsia.googlesource.com/third_party/github.com/mjansson/rpmalloc' RPMALLOC_BRANCH = '+upstream/develop' -RPMALLOC_REVISION = 'b097fd0916500439721a114bb9cd8d14bd998683' +RPMALLOC_REVISION = '668a7f81b588a985c6528b70674dbcc005d9cb75' # Used to convert os and arch strings to rpmalloc format RPMALLOC_MAP = { @@ -199,15 +199,16 @@ ['git', 'fetch', '--tags', RPMALLOC_GIT_URL, RPMALLOC_BRANCH]) api.step('checkout', ['git', 'checkout', RPMALLOC_REVISION]) - # Patch configure.py since to add -Wno-ignored-optimization-flag since - # Clang will now complain when `-funit-at-a-time` is being used. + # Patch configure.py since to add -Wno-unsafe-buffer-usage since Clang-16 will + # now complain about this when building rpmalloc (latest version only + # supports clang-15). build_ninja_clang_path = api.path.join(rpmalloc_src_dir, 'build/ninja/clang.py') build_ninja_clang_py = api.file.read_text('read %s' % build_ninja_clang_path, build_ninja_clang_path, "CXXFLAGS = ['-Wall', '-Weverything', '-Wfoo']") build_ninja_clang_py = build_ninja_clang_py.replace( "'-Wno-disabled-macro-expansion'", - "'-Wno-disabled-macro-expansion', '-Wno-ignored-optimization-argument'") + "'-Wno-disabled-macro-expansion', '-Wno-unsafe-buffer-usage'") api.file.write_text('write %s' % build_ninja_clang_path, build_ninja_clang_path, build_ninja_clang_py)