Create a config option to not link LGPL

PiperOrigin-RevId: 205427089
This commit is contained in:
A. Unique TensorFlower 2018-07-20 11:26:39 -07:00 committed by TensorFlower Gardener
parent b47e08b158
commit 41b93403ac
2 changed files with 16 additions and 0 deletions

View File

@ -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",

View File

@ -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"): [],