summaryrefslogtreecommitdiffstats
path: root/intl/icu/source/i18n/BUILD.bazel
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /intl/icu/source/i18n/BUILD.bazel
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'intl/icu/source/i18n/BUILD.bazel')
-rw-r--r--intl/icu/source/i18n/BUILD.bazel130
1 files changed, 130 insertions, 0 deletions
diff --git a/intl/icu/source/i18n/BUILD.bazel b/intl/icu/source/i18n/BUILD.bazel
new file mode 100644
index 0000000000..2d85cdb180
--- /dev/null
+++ b/intl/icu/source/i18n/BUILD.bazel
@@ -0,0 +1,130 @@
+# © 2021 and later: Unicode, Inc. and others.
+# License & terms of use: http://www.unicode.org/copyright.html
+
+# This file defines Bazel targets for a subset of the ICU4C "i18n" library header and source files.
+# The configuration of dependencies among targets is strongly assisted by the
+# file in depstest that maintains such information, at
+# icu4c/source/test/depstest/dependencies.txt .
+
+load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
+
+package(
+ default_visibility = ["//visibility:public"],
+)
+
+# When compiling code in the `common` dir, the constant
+# `U_I18n_IMPLEMENTATION` needs to be defined. See
+# https://unicode-org.github.io/icu/userguide/howtouseicu#c-with-your-own-build-system .
+
+# If linker errors occur, then this may be a sign that the dependencies were
+# not specified correctly. Use dependencies.txt in depstest for assistance. See
+# https://stackoverflow.com/q/66111709/2077918 .
+
+cc_library(
+ name = "headers",
+ hdrs = glob([
+ "unicode/*.h", # public
+ "*.h", # internal
+ ]),
+ # We need to add includes in order to preserve existing source files'
+ # include directives that use traditional paths, not paths relative to
+ # Bazel workspace:
+ # https://stackoverflow.com/a/65635893/2077918
+ includes = ["."],
+ local_defines = [
+ "U_I18N_IMPLEMENTATION",
+ ],
+)
+
+cc_library(
+ name = "collation",
+ srcs = [
+ "bocsu.cpp",
+ "coleitr.cpp",
+ "coll.cpp",
+ "collation.cpp",
+ "collationcompare.cpp",
+ "collationdata.cpp",
+ "collationdatareader.cpp",
+ "collationdatawriter.cpp",
+ "collationfastlatin.cpp",
+ # collationfcd.cpp is generated by genuca;
+ # probably hard to build genuca without depending on the old version.
+ "collationfcd.cpp",
+ "collationiterator.cpp",
+ "collationkeys.cpp",
+ "collationroot.cpp",
+ "collationrootelements.cpp",
+ "collationsets.cpp",
+ "collationsettings.cpp",
+ "collationtailoring.cpp",
+ "rulebasedcollator.cpp",
+ "sortkey.cpp",
+ "ucol.cpp",
+ "ucol_res.cpp",
+ "ucol_sit.cpp",
+ "ucoleitr.cpp",
+ "uitercollationiterator.cpp",
+ "utf16collationiterator.cpp",
+ "utf8collationiterator.cpp",
+ ],
+ includes = ["."],
+ deps = [
+ ":headers",
+ ":uclean_i18n",
+ "//icu4c/source/common:bytestream",
+ "//icu4c/source/common:normalizer2",
+ "//icu4c/source/common:platform",
+ "//icu4c/source/common:propname",
+ "//icu4c/source/common:resourcebundle",
+ "//icu4c/source/common:service_registration",
+ "//icu4c/source/common:ucharstrieiterator",
+ "//icu4c/source/common:uiter",
+ "//icu4c/source/common:ulist",
+ "//icu4c/source/common:unifiedcache",
+ "//icu4c/source/common:uset",
+ "//icu4c/source/common:usetiter",
+ "//icu4c/source/common:utrie2",
+ "//icu4c/source/common:uvector32",
+ "//icu4c/source/common:uvector64",
+ ],
+ local_defines = [
+ "U_I18N_IMPLEMENTATION",
+ ],
+)
+
+cc_library(
+ name = "collation_builder",
+ srcs = [
+ "collationbuilder.cpp",
+ "collationdatabuilder.cpp",
+ "collationfastlatinbuilder.cpp",
+ "collationruleparser.cpp",
+ "collationweights.cpp",
+ ],
+ includes = ["."],
+ deps = [
+ ":collation",
+ "//icu4c/source/common:canonical_iterator",
+ "//icu4c/source/common:ucharstriebuilder",
+ "//icu4c/source/common:uset_props"
+ ],
+ local_defines = [
+ "U_I18N_IMPLEMENTATION",
+ ],
+)
+
+cc_library(
+ name = "uclean_i18n",
+ srcs = [
+ "ucln_in.cpp",
+ ],
+ hdrs = ["ucln_in.h"],
+ includes = ["."],
+ deps = [
+ "//icu4c/source/common:platform",
+ ],
+ local_defines = [
+ "U_I18N_IMPLEMENTATION",
+ ],
+)