message: lib_package: fix dylib symlinks on mac
diff: @@ -5,7 +5,7 @@ package(default_visibility = ["//visibility:private"])
  load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar")
  load("@local_config_syslibs//:build_defs.bzl", "if_not_system_lib")
  -load("//tensorflow:tensorflow.bzl", "VERSION", "VERSION_MAJOR", "if_cuda", "if_not_windows", "tf_binary_additional_data_deps", "tf_shared_library_deps")
  +load("//tensorflow:tensorflow.bzl", "VERSION", "VERSION_MAJOR", "if_cuda", "if_macos", "if_not_windows", "tf_binary_additional_data_deps", "tf_shared_library_deps")
  load("//third_party/mkl:build_defs.bzl", "if_mkl")
  genrule(
  @@ -53,10 +53,16 @@ pkg_tar(
  pkg_tar(
  name = "common_deps",
  srcs = ["//tensorflow:tensorflow_framework"],
  - symlinks = {
  + symlinks = if_macos(
  + {
  + "libtensorflow_framework.dylib": "libtensorflow_framework.%s.dylib" % VERSION_MAJOR,
  + "libtensorflow_framework.%s.dylib" % VERSION_MAJOR: "libtensorflow_framework.%s.dylib" % VERSION,
  + },
  + {
  "libtensorflow_framework.so": "libtensorflow_framework.so.%s" % VERSION_MAJOR,
  "libtensorflow_framework.so.%s" % VERSION_MAJOR: "libtensorflow_framework.so.%s" % VERSION,
  },
  + ),
  tags = ["manual"],
  )
  @@ -92,10 +98,16 @@ pkg_tar(
  name = "clib",
  srcs = ["//tensorflow"],
  package_dir = "lib",
  - symlinks = {
  + symlinks = if_macos(
  + {
  + "lib/libtensorflow.dylib": "libtensorflow.%s.dylib" % VERSION_MAJOR,
  + "lib/libtensorflow.%s.dylib" % VERSION_MAJOR: "libtensorflow.%s.dylib" % VERSION,
  + },
  + {
  "lib/libtensorflow.so": "libtensorflow.so.%s" % VERSION_MAJOR,
  "lib/libtensorflow.so.%s" % VERSION_MAJOR: "libtensorflow.so.%s" % VERSION,
  },
  + ),
  # Mark as "manual" till
  # https://github.com/bazelbuild/bazel/issues/2352
  # and https://github.com/bazelbuild/bazel/issues/1580
  