[bazel] Cleanup style with Buildifier.
Signed-off-by: Piotr Sikora <piotrsikora@google.com> Change-Id: I5b924b02b56c66c186518cbfa372a82b960f1242 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3379226 Reviewed-by: Victor Gomes <victorgomes@chromium.org> Cr-Commit-Position: refs/heads/main@{#78559}
This commit is contained in:
parent
39f55fc7ba
commit
d82b4b6699
@ -3348,7 +3348,7 @@ cc_library(
|
||||
":torque_base_files",
|
||||
],
|
||||
copts = select({
|
||||
"@v8//bazel/config:is_posix": [ "-fexceptions" ],
|
||||
"@v8//bazel/config:is_posix": ["-fexceptions"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
features = ["-use_header_modules"],
|
||||
@ -3462,7 +3462,7 @@ v8_binary(
|
||||
":torque_base_files",
|
||||
],
|
||||
copts = select({
|
||||
"@v8//bazel/config:is_posix": [ "-fexceptions" ],
|
||||
"@v8//bazel/config:is_posix": ["-fexceptions"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
features = ["-use_header_modules"],
|
||||
|
11
WORKSPACE
11
WORKSPACE
@ -5,15 +5,18 @@
|
||||
workspace(name = "v8")
|
||||
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
http_archive(
|
||||
name = "bazel_skylib",
|
||||
sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
|
||||
urls = [
|
||||
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
|
||||
],
|
||||
sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
|
||||
)
|
||||
|
||||
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
|
||||
|
||||
bazel_skylib_workspace()
|
||||
|
||||
http_archive(
|
||||
@ -33,8 +36,8 @@ pip_install(
|
||||
|
||||
new_local_repository(
|
||||
name = "com_googlesource_chromium_zlib",
|
||||
path = "third_party/zlib",
|
||||
build_file = "bazel/BUILD.zlib",
|
||||
path = "third_party/zlib",
|
||||
)
|
||||
|
||||
bind(
|
||||
@ -49,8 +52,8 @@ bind(
|
||||
|
||||
new_local_repository(
|
||||
name = "com_googlesource_chromium_icu",
|
||||
path = "third_party/icu",
|
||||
build_file = "bazel/BUILD.icu",
|
||||
path = "third_party/icu",
|
||||
)
|
||||
|
||||
bind(
|
||||
@ -60,8 +63,8 @@ bind(
|
||||
|
||||
new_local_repository(
|
||||
name = "com_googlesource_chromium_base_trace_event_common",
|
||||
path = "base/trace_event/common",
|
||||
build_file = "bazel/BUILD.trace_event_common",
|
||||
path = "base/trace_event/common",
|
||||
)
|
||||
|
||||
bind(
|
||||
|
@ -4,15 +4,31 @@
|
||||
|
||||
filegroup(
|
||||
name = "icudata",
|
||||
srcs = [ "common/icudtl.dat" ]
|
||||
srcs = ["common/icudtl.dat"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "icuuc",
|
||||
srcs = glob([
|
||||
"source/common/**/*.h",
|
||||
"source/common/**/*.cpp"
|
||||
"source/common/**/*.cpp",
|
||||
]),
|
||||
copts = select({
|
||||
"@platforms//os:windows": [
|
||||
"/wd4005", # Macro redefinition.
|
||||
"/wd4068", # Unknown pragmas.
|
||||
"/wd4267", # Conversion from size_t on 64-bits.
|
||||
"/utf-8", # ICU source files are in UTF-8.
|
||||
],
|
||||
"//conditions:default": [
|
||||
"-Wno-unused-function",
|
||||
"-Wno-parentheses",
|
||||
"-Wno-unused-function",
|
||||
"-Wno-unused-variable",
|
||||
"-Wno-deprecated-declarations",
|
||||
],
|
||||
}),
|
||||
data = [":icudata"],
|
||||
defines = [
|
||||
"U_COMMON_IMPLEMENTATION",
|
||||
"U_ICUDATAENTRY_IN_COMMON",
|
||||
@ -34,27 +50,11 @@ cc_library(
|
||||
],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
copts = select({
|
||||
"@platforms//os:windows": [
|
||||
"/wd4005", # Macro redefinition.
|
||||
"/wd4068", # Unknown pragmas.
|
||||
"/wd4267", # Conversion from size_t on 64-bits.
|
||||
"/utf-8", # ICU source files are in UTF-8.
|
||||
],
|
||||
"//conditions:default": [
|
||||
"-Wno-unused-function",
|
||||
"-Wno-parentheses",
|
||||
"-Wno-unused-function",
|
||||
"-Wno-unused-variable",
|
||||
"-Wno-deprecated-declarations",
|
||||
],
|
||||
}),
|
||||
includes = [
|
||||
"source/common",
|
||||
"source/i18n",
|
||||
],
|
||||
tags = ["requires-rtti"],
|
||||
data = [ ":icudata" ],
|
||||
alwayslink = 1,
|
||||
)
|
||||
|
||||
@ -62,7 +62,7 @@ cc_library(
|
||||
name = "icui18n",
|
||||
srcs = glob([
|
||||
"source/i18n/**/*.h",
|
||||
"source/i18n/**/*.cpp"
|
||||
"source/i18n/**/*.cpp",
|
||||
]),
|
||||
copts = select({
|
||||
"@platforms//os:windows": [
|
||||
@ -83,19 +83,19 @@ cc_library(
|
||||
],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
deps = [ ":icuuc" ],
|
||||
deps = [":icuuc"],
|
||||
alwayslink = 1,
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "icu",
|
||||
srcs = [
|
||||
"source/stubdata/stubdata.cpp",
|
||||
],
|
||||
hdrs = glob([
|
||||
"source/common/unicode/*.h",
|
||||
"source/i18n/unicode/*.h",
|
||||
]),
|
||||
srcs = [
|
||||
"source/stubdata/stubdata.cpp",
|
||||
],
|
||||
copts = select({
|
||||
"@platforms//os:windows": [
|
||||
"/wd4005", # Macro redefinition.
|
||||
@ -116,10 +116,10 @@ cc_library(
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
include_prefix = "third_party/icu",
|
||||
deps = [
|
||||
":icuuc",
|
||||
":icui18n"
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":icui18n",
|
||||
":icuuc",
|
||||
],
|
||||
alwayslink = 1,
|
||||
)
|
||||
|
@ -40,7 +40,6 @@ cc_library(
|
||||
hdrs = [
|
||||
"zlib.h",
|
||||
],
|
||||
include_prefix = "third_party/zlib",
|
||||
defines = [
|
||||
"CHROMIUM_ZLIB_NO_CHROMECONF",
|
||||
"CPU_NO_SIMD",
|
||||
@ -50,6 +49,7 @@ cc_library(
|
||||
"HAVE_HIDDEN",
|
||||
],
|
||||
}),
|
||||
include_prefix = "third_party/zlib",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
|
@ -182,57 +182,87 @@ selects.config_setting_group(
|
||||
match_all = [
|
||||
":is_posix",
|
||||
":is_x64",
|
||||
]
|
||||
],
|
||||
)
|
||||
|
||||
selects.config_setting_group(
|
||||
name = "is_inline_asm_x64",
|
||||
match_all = [":is_posix", ":is_x64"],
|
||||
match_all = [
|
||||
":is_posix",
|
||||
":is_x64",
|
||||
],
|
||||
)
|
||||
|
||||
selects.config_setting_group(
|
||||
name = "is_inline_asm_ia32",
|
||||
match_all = [":is_posix", ":is_ia32"],
|
||||
match_all = [
|
||||
":is_posix",
|
||||
":is_ia32",
|
||||
],
|
||||
)
|
||||
|
||||
selects.config_setting_group(
|
||||
name = "is_inline_asm_arm64",
|
||||
match_all = [":is_posix", ":is_arm64"],
|
||||
match_all = [
|
||||
":is_posix",
|
||||
":is_arm64",
|
||||
],
|
||||
)
|
||||
|
||||
selects.config_setting_group(
|
||||
name = "is_inline_asm_arm",
|
||||
match_all = [":is_posix", ":is_arm"],
|
||||
match_all = [
|
||||
":is_posix",
|
||||
":is_arm",
|
||||
],
|
||||
)
|
||||
|
||||
selects.config_setting_group(
|
||||
name = "is_inline_asm_s390x",
|
||||
match_all = [":is_posix", ":is_s390x"],
|
||||
match_all = [
|
||||
":is_posix",
|
||||
":is_s390x",
|
||||
],
|
||||
)
|
||||
|
||||
selects.config_setting_group(
|
||||
name = "is_inline_asm_riscv64",
|
||||
match_all = [":is_posix", ":is_riscv64"],
|
||||
match_all = [
|
||||
":is_posix",
|
||||
":is_riscv64",
|
||||
],
|
||||
)
|
||||
|
||||
selects.config_setting_group(
|
||||
name = "is_inline_asm_ppc64le",
|
||||
match_all = [":is_posix", ":is_ppc64le"],
|
||||
match_all = [
|
||||
":is_posix",
|
||||
":is_ppc64le",
|
||||
],
|
||||
)
|
||||
|
||||
selects.config_setting_group(
|
||||
name = "is_msvc_asm_x64",
|
||||
match_all = [":is_windows", ":is_x64"],
|
||||
match_all = [
|
||||
":is_windows",
|
||||
":is_x64",
|
||||
],
|
||||
)
|
||||
|
||||
selects.config_setting_group(
|
||||
name = "is_msvc_asm_ia32",
|
||||
match_all = [":is_windows", ":is_ia32"],
|
||||
match_all = [
|
||||
":is_windows",
|
||||
":is_ia32",
|
||||
],
|
||||
)
|
||||
|
||||
selects.config_setting_group(
|
||||
name = "is_msvc_asm_arm64",
|
||||
match_all = [":is_windows", ":is_arm64"],
|
||||
match_all = [
|
||||
":is_windows",
|
||||
":is_arm64",
|
||||
],
|
||||
)
|
||||
|
||||
config_setting(
|
||||
|
@ -248,6 +248,7 @@ def v8_library(
|
||||
linkstatic = 1,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
# Alias target used because of cc_library bug in bazel on windows
|
||||
# https://github.com/bazelbuild/bazel/issues/14237
|
||||
# TODO(victorgomes): Remove alias once bug is fixed
|
||||
@ -266,6 +267,7 @@ def v8_library(
|
||||
linkstatic = 1,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
# Alias target used because of cc_library bug in bazel on windows
|
||||
# https://github.com/bazelbuild/bazel/issues/14237
|
||||
# TODO(victorgomes): Remove alias once bug is fixed
|
||||
|
Loading…
Reference in New Issue
Block a user