[bazel] Fix the icu build and buildifier warnings

.. introduced by crrev.com/c/4196117.

- Move src/builtins/builtins-intl-gen.cc to the v8_initializers_files
  target.
- Prefix unused variables with '_'.

Bug: v8:13629
Change-Id: Ib82cc581cfba1f2dab728bb6e08dfce3bf6f1561
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212392
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85596}
This commit is contained in:
Jakob Linke 2023-02-01 13:30:48 +01:00 committed by V8 LUCI CQ
parent e4a9f0a5f2
commit d29a0c4e9b
2 changed files with 13 additions and 5 deletions

View File

@ -2588,7 +2588,6 @@ filegroup(
name = "icu/v8_base_without_compiler_files",
srcs = [
"src/builtins/builtins-intl.cc",
"src/builtins/builtins-intl-gen.cc",
"src/objects/intl-objects.cc",
"src/objects/intl-objects.h",
"src/objects/js-break-iterator.cc",
@ -3016,7 +3015,7 @@ filegroup(
)
filegroup(
name = "v8_initializers_files",
name = "noicu/v8_initializers_files",
srcs = [
"src/builtins/builtins-array-gen.cc",
"src/builtins/builtins-array-gen.h",
@ -3108,6 +3107,14 @@ filegroup(
}),
)
filegroup(
name = "icu/v8_initializers_files",
srcs = [
"src/builtins/builtins-intl-gen.cc",
":noicu/v8_initializers_files",
],
)
filegroup(
name = "cppgc_base_files",
srcs = [
@ -3813,7 +3820,6 @@ v8_binary(
name = "mksnapshot",
srcs = [
":mksnapshot_files",
":v8_initializers_files",
] + select({
":is_not_v8_enable_turbofan": [
# Turbofan is needed to generate builtins.
@ -3829,10 +3835,12 @@ v8_binary(
}),
icu_srcs = [
":icu/generated_torque_initializers",
":icu/v8_initializers_files",
],
noicu_deps = [":v8_libshared_noicu"],
noicu_srcs = [
":noicu/generated_torque_initializers",
":noicu/v8_initializers_files",
],
)

View File

@ -317,7 +317,7 @@ def _torque_initializers_impl(ctx):
# Generate/declare output files
outs = []
for src in ctx.files.srcs:
root, period, ext = src.path.rpartition(".")
root, _period, _ext = src.path.rpartition(".")
# Strip v8root
if root[:len(v8root)] == v8root:
@ -397,7 +397,7 @@ def _torque_definitions_impl(ctx):
# Generate/declare output files
outs = []
for src in ctx.files.srcs:
root, period, ext = src.path.rpartition(".")
root, _period, _ext = src.path.rpartition(".")
# Strip v8root
if root[:len(v8root)] == v8root: