• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"""Provides the repository macro to import absl."""
2
3load("//third_party:repo.bzl", "tf_http_archive")
4
5def repo():
6    """Imports absl."""
7
8    # Attention: tools parse and update these lines.
9    # LINT.IfChange
10    ABSL_COMMIT = "997aaf3a28308eba1b9156aa35ab7bca9688e9f6"
11    ABSL_SHA256 = "35f22ef5cb286f09954b7cc4c85b5a3f6221c9d4df6b8c4a1e9d399555b366ee"
12    # LINT.ThenChange(//tensorflow/lite/tools/cmake/modules/abseil-cpp.cmake)
13
14    tf_http_archive(
15        name = "com_google_absl",
16        sha256 = ABSL_SHA256,
17        build_file = "//third_party/absl:com_google_absl.BUILD",
18        # TODO(mihaimaruseac): Remove the patch when https://github.com/abseil/abseil-cpp/issues/326 is resolved
19        patch_file = "//third_party/absl:com_google_absl_fix_mac_and_nvcc_build.patch",
20        strip_prefix = "abseil-cpp-{commit}".format(commit = ABSL_COMMIT),
21        urls = [
22            "https://storage.googleapis.com/mirror.tensorflow.org/github.com/abseil/abseil-cpp/archive/{commit}.tar.gz".format(commit = ABSL_COMMIT),
23            "https://github.com/abseil/abseil-cpp/archive/{commit}.tar.gz".format(commit = ABSL_COMMIT),
24        ],
25    )
26