commit | e8f7d9539b23193297737d1a1c6351270a40795f | [log] [tgz] |
---|---|---|
author | Dan Zheng <danielzheng@google.com> | Sat Nov 23 12:59:30 2019 -0800 |
committer | TensorFlower Gardener <gardener@tensorflow.org> | Sat Nov 23 13:04:03 2019 -0800 |
tree | b37b58b97610cf5c9cc7c25c3d01cd4ed8aaac18 | |
parent | 3161ad3ea15d41b986ca3841c51aa7717d19a2f3 [diff] |
Add `alwayslink = 1` to fix undefined symbol linker errors for Swift for TensorFlow. Context: https://github.com/apple/swift/pull/28438#issuecomment-557736052 Related Bazel change: https://github.com/bazelbuild/bazel/issues/7362 (`--incompatible_remove_legacy_whole_archive`) Previously, libraries were wrapped in `--whole_archive` and `--no_whole_archive` so that entire libraries were linked. With Bazel 1.0, libraries that export unused symbols must be explicitly tagged with `alwayslink = 1`. PiperOrigin-RevId: 282157053 Change-Id: Ica85797aeeb99e15402cdd06e61bbbf58011f141
diff --git a/tensorflow/c/BUILD b/tensorflow/c/BUILD index a533fdd..fd58c1b 100644 --- a/tensorflow/c/BUILD +++ b/tensorflow/c/BUILD
@@ -158,6 +158,7 @@ "//tensorflow/core/kernels:logging_ops", ], }), + alwayslink = 1, ) tf_cuda_library(