https://github.com/bazelbuild/bazel/issues/7362 This PR updates `cc_library`s to use `alwayslink=1` when needed. Currently, library archives and library object groups are wrapped in `--whole_archive`, `--no_whole_archive`, thus the whole library is always linked. This changes with Bazel 1.0, and libraries that export otherwise unused symbols must be tagged as `alwayslink=1`. This PR fixes https://github.com/tensorflow/tensorflow/issues/32835 (once again, as it was fixed by https://github.com/tensorflow/tensorflow/pull/33415 but the codebase regressed in the meantime.) It also fixes most of the TF tests. PiperOrigin-RevId: 276772147 Change-Id: I05db02e84200a484df52f4f02b601dc486636912
45 lines
1.5 KiB
Python
45 lines
1.5 KiB
Python
package(
|
|
default_visibility = ["//visibility:public"],
|
|
)
|
|
|
|
licenses(["notice"]) # Apache 2.0
|
|
|
|
exports_files(["LICENSE"])
|
|
|
|
# Data for core MIME/Unix/Windows encodings:
|
|
# ISO 8859-2..9, 15; Windows-125x; EUC-CN; GBK (Windows cp936); GB 18030;
|
|
# Big5 (Windows cp950); SJIS (Windows cp932); EUC-JP; EUC-KR, KS C 5601;
|
|
# Windows cp949. Data is pre-processed for little-endian platforms. To replicate
|
|
# this pre-processing (if you want additional encodings, for example), do the
|
|
# following:
|
|
#
|
|
# First, download, build, and install ICU. This installs tools such as makeconv.
|
|
# Then, run the following from your icu4c/source directory:
|
|
# $ cp [path to filters.json] .
|
|
# $ ICU_DATA_FILTER_FILE=filters.json ./runConfigureICU Linux
|
|
# $ make clean && make
|
|
# $ cd data/out/tmp
|
|
# $ genccode icudt64l.dat
|
|
# $ echo 'U_CAPI const void * U_EXPORT2 uprv_getICUData_conversion() { return icudt64l_dat.bytes; }' >> icudt64l_dat.c
|
|
# This creates icudt64l_dat.c, which you can move, rename, gzip, then split.
|
|
filegroup(
|
|
name = "conversion_files",
|
|
srcs = glob(["icu_conversion_data.c.gz.*"]),
|
|
)
|
|
|
|
# Data files are compressed and split to work around git performance degradation
|
|
# around large files.
|
|
genrule(
|
|
name = "merge_conversion_data",
|
|
srcs = [":conversion_files"],
|
|
outs = ["conversion_data.c"],
|
|
cmd = "cat $(locations :conversion_files) | gunzip > $@",
|
|
)
|
|
|
|
cc_library(
|
|
name = "conversion_data",
|
|
srcs = [":conversion_data.c"],
|
|
deps = ["@icu//:headers"],
|
|
alwayslink = 1,
|
|
)
|