Skip to content

Commit

Permalink
Add more alwayslink = 1 so we can build Tensorflow on Windows after -…
Browse files Browse the repository at this point in the history
…-incompatible_remove_legacy_whole_archive (bazelbuild/bazel#7362) is flipped

Currently, library archives and library object groups are wrapped in `--whole_archive`, `--no_whole_archive`, thus the whole library is always linked. This will change with Bazel 1.0, and libraries that export otherwise unused symbols must be tagged as `alwayslink=1`.

PiperOrigin-RevId: 267115768
(cherry picked from commit afb7639)
  • Loading branch information
tensorflower-gardener authored and timokau committed Nov 7, 2019
1 parent 3a75d05 commit 85212b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions tensorflow/c/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ tf_cuda_library(
"//tensorflow/core/platform",
"@com_google_absl//absl/strings",
],
alwayslink = 1,
)

exports_files(
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/c/eager/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ tf_cuda_library(
"//tensorflow/core/profiler/lib:profiler_session",
"//tensorflow/core:gpu_runtime",
],
alwayslink = 1,
)

tf_cuda_library(
Expand Down Expand Up @@ -226,6 +227,7 @@ tf_cuda_library(
"//tensorflow/core/profiler/rpc/client:capture_profile",
"//tensorflow/core:gpu_runtime",
],
alwayslink = 1,
)

tf_cuda_cc_test(
Expand Down

0 comments on commit 85212b6

Please sign in to comment.