Fold iOS-specific targets into the portable targets.
PiperOrigin-RevId: 310569018 Change-Id: Ic1bc71bbd6dd0f10c6d5442c5a30e587852a1eab
This commit is contained in:
parent
57d2ac3f07
commit
3345a4083e
@ -4,7 +4,6 @@
|
||||
load(
|
||||
"//tensorflow:tensorflow.bzl",
|
||||
"if_android",
|
||||
"if_ios",
|
||||
"if_mobile",
|
||||
"if_not_mobile",
|
||||
"tf_cc_test",
|
||||
|
||||
@ -1417,54 +1417,12 @@ cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
# Native library support for iOS applications.
|
||||
#
|
||||
# bazel build --config=ios_x86_64 \
|
||||
# :ios_tensorflow_lib
|
||||
cc_library(
|
||||
name = "ios_tensorflow_lib",
|
||||
srcs = if_ios([
|
||||
":portable_op_registrations_and_gradients",
|
||||
"//tensorflow/core/kernels:android_core_ops",
|
||||
"//tensorflow/core/kernels:android_extended_ops",
|
||||
]),
|
||||
copts = tf_copts() + tf_opts_nortti_if_lite_protos() + ["-Os"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":portable_tensorflow_lib_lite",
|
||||
":protos_all_cc_impl",
|
||||
"//third_party/eigen3",
|
||||
"//third_party/fft2d:fft2d_headers",
|
||||
"@com_google_protobuf//:protobuf",
|
||||
"@fft2d",
|
||||
"@gemmlowp",
|
||||
],
|
||||
alwayslink = 1,
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "ios_tensorflow_lib_lite",
|
||||
actual = ":portable_tensorflow_lib_lite",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "ios_tensorflow_test_lib",
|
||||
testonly = 1,
|
||||
srcs = if_ios([":android_test_srcs"]),
|
||||
copts = tf_copts() + ["-Os"],
|
||||
tags = [
|
||||
"manual",
|
||||
"notap",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":ios_tensorflow_lib",
|
||||
"//tensorflow/core/platform/default/build_config:gtest",
|
||||
"//third_party/eigen3",
|
||||
],
|
||||
)
|
||||
|
||||
# Full TensorFlow library with operator support. Use this unless reducing
|
||||
# binary size (by packaging a reduced operator set) is a concern.
|
||||
alias(
|
||||
@ -1473,10 +1431,16 @@ alias(
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "ios_tensorflow_lib",
|
||||
actual = ":portable_tensorflow_lib",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "portable_tensorflow_lib",
|
||||
srcs = if_mobile([":portable_op_registrations_and_gradients"]),
|
||||
copts = tf_copts() + tf_opts_nortti_if_lite_protos(),
|
||||
copts = tf_copts() + tf_opts_nortti_if_lite_protos() + if_ios(["-Os"]),
|
||||
features = tf_features_nomodules_if_mobile(),
|
||||
tags = [
|
||||
"manual",
|
||||
@ -1559,6 +1523,12 @@ alias(
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "ios_tensorflow_test_lib",
|
||||
actual = ":portable_tensorflow_test_lib",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "portable_tensorflow_test_lib",
|
||||
testonly = 1,
|
||||
@ -1569,7 +1539,7 @@ cc_library(
|
||||
"//tensorflow/core/framework:android_test_hdrs",
|
||||
"//tensorflow/core/util:android_test_hdrs",
|
||||
],
|
||||
copts = tf_copts(android_optimization_level_override = None),
|
||||
copts = tf_copts(android_optimization_level_override = None) + if_ios(["-Os"]),
|
||||
features = tf_features_nomodules_if_mobile() + tf_opts_nortti_if_lite_protos(),
|
||||
tags = [
|
||||
"manual",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user