Skip to content

Commit

Permalink
Adding tf_mobile_aware_deps macro.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 270791843
  • Loading branch information
bmzhao authored and tensorflower-gardener committed Sep 24, 2019
1 parent 40fb2e3 commit 014df5e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tensorflow/core/platform/default/build_refactor.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ load(
"tf_copts",
)

TF_PLATFORM_LIBRARIES = {
TF_DEFAULT_PLATFORM_LIBRARIES = {
"context": {
"name": "context_impl",
"hdrs": ["//tensorflow/core/platform:context.h"],
Expand Down Expand Up @@ -482,11 +482,14 @@ def tf_instantiate_platform_libraries(names = []):
tags = ["no_oss", "manual"],
)
else:
if name in TF_PLATFORM_LIBRARIES:
native.cc_library(**TF_PLATFORM_LIBRARIES[name])
if name in TF_DEFAULT_PLATFORM_LIBRARIES:
native.cc_library(**TF_DEFAULT_PLATFORM_LIBRARIES[name])
if name in TF_WINDOWS_PLATFORM_LIBRARIES:
native.cc_library(**TF_WINDOWS_PLATFORM_LIBRARIES[name])

def tf_mobile_aware_deps(name):
return [":" + name]

def tf_platform_helper_deps(name):
return select({
"//tensorflow:windows": [":windows_" + name],
Expand Down

0 comments on commit 014df5e

Please sign in to comment.