tensorflow/third_party/icu/icu.BUILD
Itai Zukerman 8fa1dfaa38 BUILD.bazel files in //third_party/name were by convention copied to the
root of the 3P repository.  But BUILD.bazel was also being interpreted by
bazel as the BUILD file for the //third_party/name folder, which is wrong.

This change renames those files to name.BUILD, a convention already being
used by some packages.

PiperOrigin-RevId: 409278565
Change-Id: Ib99c3474ec0b20d04cdb9d828f68c8303caec5fe
2021-11-11 17:08:47 -08:00

87 lines
1.7 KiB
Plaintext

package(
default_visibility = ["//visibility:public"],
)
licenses(["notice"]) # Apache 2.0
exports_files([
"icu4c/LICENSE",
"icu4j/main/shared/licenses/LICENSE",
])
cc_library(
name = "headers",
hdrs = glob(["icu4c/source/common/unicode/*.h"]),
includes = [
"icu4c/source/common",
],
deps = [
],
)
cc_library(
name = "common",
hdrs = glob(["icu4c/source/common/unicode/*.h"]),
includes = [
"icu4c/source/common",
],
deps = [
":icuuc",
],
)
cc_library(
name = "icuuc",
srcs = glob(
[
"icu4c/source/common/*.c",
"icu4c/source/common/*.cpp",
"icu4c/source/stubdata/*.cpp",
],
),
hdrs = glob([
"icu4c/source/common/*.h",
]),
copts = [
"-DU_COMMON_IMPLEMENTATION",
"-DU_HAVE_STD_ATOMICS", # TODO(gunan): Remove when TF is on ICU 64+.
] + select({
":android": [
"-fdata-sections",
"-DU_HAVE_NL_LANGINFO_CODESET=0",
"-Wno-deprecated-declarations",
],
":apple": [
"-Wno-shorten-64-to-32",
"-Wno-unused-variable",
],
":windows": [
"/utf-8",
"/DLOCALE_ALLOW_NEUTRAL_NAMES=0",
],
"//conditions:default": [],
}),
tags = ["requires-rtti"],
visibility = [
"//visibility:private",
],
deps = [
":headers",
],
)
config_setting(
name = "android",
values = {"crosstool_top": "//external:android/crosstool"},
)
config_setting(
name = "apple",
values = {"cpu": "darwin"},
)
config_setting(
name = "windows",
values = {"cpu": "x64_windows"},
)