Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
The build was broken:

error: weak declaration of 'tensorflow::npd::kTfNextPluggableDeviceUseCApi' must be public

This is because weak implies static. Fix it by explicitly declare as extern.

PiperOrigin-RevId: 531785697
  • Loading branch information
hhb authored and tensorflower-gardener committed May 13, 2023
1 parent 7a6e454 commit 852f109
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace tensorflow {
namespace npd {

// Define as a weak symbol so that it can be overridden when necessary.
const bool kTfNextPluggableDeviceUseCApi __attribute__((weak)) = false;
extern const bool kTfNextPluggableDeviceUseCApi __attribute__((weak)) = false;

} // namespace npd
} // namespace tensorflow

0 comments on commit 852f109

Please sign in to comment.