aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-07-20 11:26:39 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-07-20 11:29:52 -0700
commit41b93403ac8148bd880c749165c40840ddb95b44 (patch)
tree9557c1da80baa544d674aff826b2b0489f3c6f19
parentb47e08b1580033ff63fd7b9a2661e30049afb43d (diff)
Create a config option to not link LGPL
PiperOrigin-RevId: 205427089
-rw-r--r--tensorflow/BUILD8
-rw-r--r--tensorflow/tensorflow.bzl8
2 files changed, 16 insertions, 0 deletions
diff --git a/tensorflow/BUILD b/tensorflow/BUILD
index 518c2b0489..388ca3f293 100644
--- a/tensorflow/BUILD
+++ b/tensorflow/BUILD
@@ -24,6 +24,14 @@ load(
"gen_api_init_files", # @unused
)
+# Config setting used when building for products
+# which requires restricted licenses to be avoided.
+config_setting(
+ name = "no_lgpl_deps",
+ values = {"define": "__TENSORFLOW_NO_LGPL_DEPS__=1"},
+ visibility = ["//visibility:public"],
+)
+
# Config setting for determining if we are building for Android.
config_setting(
name = "android",
diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl
index 955b53f691..954940642b 100644
--- a/tensorflow/tensorflow.bzl
+++ b/tensorflow/tensorflow.bzl
@@ -137,6 +137,14 @@ def if_not_mobile(a):
"//conditions:default": a,
})
+# Config setting selector used when building for products
+# which requires restricted licenses to be avoided.
+def if_not_lgpl_restricted(a):
+ _ = (a,)
+ return select({
+ "//conditions:default": [],
+ })
+
def if_not_windows(a):
return select({
clean_dep("//tensorflow:windows"): [],