diff options
Diffstat (limited to 'deps/clog/BUILD.bazel')
-rw-r--r-- | deps/clog/BUILD.bazel | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/deps/clog/BUILD.bazel b/deps/clog/BUILD.bazel new file mode 100644 index 0000000..7dc52ea --- /dev/null +++ b/deps/clog/BUILD.bazel @@ -0,0 +1,58 @@ +# Copied from TensorFlow's `https://github.com/tensorflow/tensorflow/blob/master/third_party/clog/clog.BUILD +# Licenced under Apache-2.0 License + +# Description: +# C-style (a-la printf) logging library + +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +exports_files(["LICENSE"]) + +cc_library( + name = "clog", + srcs = [ + "src/clog.c", + ], + hdrs = [ + "include/clog.h", + ], + copts = select({ + ":windows": [], + "//conditions:default": ["-Wno-unused-result"], + }), + defines = select({ + # When linkstatic=False, we need default visibility + ":macos_x86_64": ["CLOG_VISIBILITY="], + "//conditions:default": [], + }), + linkopts = select({ + ":android": ["-llog"], + "//conditions:default": [], + }), + linkstatic = select({ + # https://github.com/bazelbuild/bazel/issues/11552 + ":macos_x86_64": False, + "//conditions:default": True, + }), + strip_include_prefix = "include", +) + +config_setting( + name = "android", + values = {"crosstool_top": "//external:android/crosstool"}, +) + +config_setting( + name = "windows", + values = {"cpu": "x64_windows"}, +) + +config_setting( + name = "macos_x86_64", + values = { + "apple_platform_type": "macos", + "cpu": "darwin", + }, +) |