diff options
author | 2018-01-04 16:22:25 -0800 | |
---|---|---|
committer | 2018-01-04 16:22:25 -0800 | |
commit | 696a5287cdcf515683c3811f3676ab232b5d2b11 (patch) | |
tree | 9e6c514540eae63e1971928e9b7de095c54b0eb5 /third_party | |
parent | 2ebfeda9bad9d1f867205fa8de3db564953ebc23 (diff) | |
parent | d6a9ea3dc2e91e9520f42c3b8cb66ad47bd4694d (diff) |
Merge commit for internal changes
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/gpus/cuda/BUILD.tpl | 1 | ||||
-rw-r--r-- | third_party/sqlite.BUILD | 61 |
2 files changed, 55 insertions, 7 deletions
diff --git a/third_party/gpus/cuda/BUILD.tpl b/third_party/gpus/cuda/BUILD.tpl index b752734a08..2a37c65bc7 100644 --- a/third_party/gpus/cuda/BUILD.tpl +++ b/third_party/gpus/cuda/BUILD.tpl @@ -46,6 +46,7 @@ cc_library( includes = [ ".", "cuda/include", + "cuda/include/crt", ], visibility = ["//visibility:public"], ) diff --git a/third_party/sqlite.BUILD b/third_party/sqlite.BUILD index 9840d7b151..761838d194 100644 --- a/third_party/sqlite.BUILD +++ b/third_party/sqlite.BUILD @@ -1,16 +1,63 @@ # Description: -# Sqlite3 library. Provides utilities for interacting -# with sqlite3 databases. +# sqlite3 is a serverless SQL RDBMS. licenses(["unencumbered"]) # Public Domain -# exports_files(["LICENSE"]) +SQLITE_COPTS = [ + "-DHAVE_DECL_STRERROR_R=1", + "-DHAVE_STDINT_H=1", + "-DHAVE_INTTYPES_H=1", + "-D_FILE_OFFSET_BITS=64", + "-D_REENTRANT=1", +] + select({ + "@org_tensorflow//tensorflow:windows": [ + "-DSQLITE_MAX_TRIGGER_DEPTH=100", + ], + "@org_tensorflow//tensorflow:windows_msvc": [ + "-DSQLITE_MAX_TRIGGER_DEPTH=100", + ], + "@org_tensorflow//tensorflow:darwin": [ + "-DHAVE_GMTIME_R=1", + "-DHAVE_LOCALTIME_R=1", + "-DHAVE_USLEEP=1", + ], + "//conditions:default": [ + "-DHAVE_FDATASYNC=1", + "-DHAVE_GMTIME_R=1", + "-DHAVE_LOCALTIME_R=1", + "-DHAVE_POSIX_FALLOCATE=1", + "-DHAVE_USLEEP=1", + ], +}) +# Production build of SQLite library that's baked into TensorFlow. cc_library( - name = "sqlite", + name = "org_sqlite", srcs = ["sqlite3.c"], - hdrs = ["sqlite3.h"], - includes = ["."], - linkopts = ["-lm"], + hdrs = [ + "sqlite3.h", + "sqlite3ext.h", + ], + copts = SQLITE_COPTS, + defines = [ + # This gets rid of the bloat of deprecated functionality. It + # needs to be listed here instead of copts because it's actually + # referenced in the sqlite3.h file. + "SQLITE_OMIT_DEPRECATED", + ], + linkopts = select({ + "@org_tensorflow//tensorflow:windows_msvc": [], + "//conditions:default": [ + "-ldl", + "-lpthread", + ], + }), + visibility = ["//visibility:public"], +) + +# This is a Copybara sync helper for Google. +py_library( + name = "python", + srcs_version = "PY2AND3", visibility = ["//visibility:public"], ) |