diff options
author | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-13 16:49:31 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-13 16:49:31 -0700 |
commit | b2dfe8a52053618afa1b0bd034ccbd2f9126ae6a (patch) | |
tree | 1ead16b2cae51dd59edbaf9fe79072457ae7f6bb /third_party | |
parent | 8202d1c154d21a42ee7343f2bcab64c909c95c76 (diff) | |
parent | c7e29163d49db7c4957fb225d17bda86d086a14b (diff) |
Merge pull request #20536 from rongjiecomputer:flag
PiperOrigin-RevId: 208565050
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/curl.BUILD | 14 | ||||
-rw-r--r-- | third_party/double_conversion.BUILD | 16 | ||||
-rw-r--r-- | third_party/farmhash.BUILD | 8 | ||||
-rw-r--r-- | third_party/fft2d/fft2d.BUILD | 10 | ||||
-rw-r--r-- | third_party/flatbuffers/flatbuffers.BUILD | 15 | ||||
-rw-r--r-- | third_party/gif.BUILD | 9 | ||||
-rw-r--r-- | third_party/jpeg/jpeg.BUILD | 8 | ||||
-rw-r--r-- | third_party/lmdb.BUILD | 6 | ||||
-rw-r--r-- | third_party/nasm.BUILD | 9 | ||||
-rw-r--r-- | third_party/snappy.BUILD | 12 | ||||
-rw-r--r-- | third_party/sqlite.BUILD | 8 | ||||
-rw-r--r-- | third_party/swig.BUILD | 6 | ||||
-rw-r--r-- | third_party/zlib.BUILD | 1 |
13 files changed, 33 insertions, 89 deletions
diff --git a/third_party/curl.BUILD b/third_party/curl.BUILD index 1638b72161..c93fac6549 100644 --- a/third_party/curl.BUILD +++ b/third_party/curl.BUILD @@ -243,7 +243,6 @@ cc_library( "lib/vtls/darwinssl.c", ], "@org_tensorflow//tensorflow:windows": CURL_WIN_SRCS, - "@org_tensorflow//tensorflow:windows_msvc": CURL_WIN_SRCS, "//conditions:default": [ "lib/vtls/openssl.c", ], @@ -260,7 +259,6 @@ cc_library( ], copts = select({ "@org_tensorflow//tensorflow:windows": CURL_WIN_COPTS, - "@org_tensorflow//tensorflow:windows_msvc": CURL_WIN_COPTS, "//conditions:default": [ "-Iexternal/curl/lib", "-D_GNU_SOURCE", @@ -280,10 +278,6 @@ cc_library( # See curl.h for discussion of write size and Windows "/DCURL_MAX_WRITE_SIZE=16384", ], - "@org_tensorflow//tensorflow:windows_msvc": [ - # See curl.h for discussion of write size and Windows - "/DCURL_MAX_WRITE_SIZE=16384", - ], "//conditions:default": [ "-DCURL_MAX_WRITE_SIZE=65536", ], @@ -307,12 +301,6 @@ cc_library( "-DEFAULTLIB:crypt32.lib", "-DEFAULTLIB:Normaliz.lib", ], - "@org_tensorflow//tensorflow:windows_msvc": [ - "-DEFAULTLIB:ws2_32.lib", - "-DEFAULTLIB:advapi32.lib", - "-DEFAULTLIB:crypt32.lib", - "-DEFAULTLIB:Normaliz.lib", - ], "//conditions:default": [ "-lrt", ], @@ -323,7 +311,6 @@ cc_library( ] + select({ "@org_tensorflow//tensorflow:ios": [], "@org_tensorflow//tensorflow:windows": [], - "@org_tensorflow//tensorflow:windows_msvc": [], "//conditions:default": [ "@boringssl//:ssl", ], @@ -426,7 +413,6 @@ cc_binary( ], copts = select({ "@org_tensorflow//tensorflow:windows": CURL_BIN_WIN_COPTS, - "@org_tensorflow//tensorflow:windows_msvc": CURL_BIN_WIN_COPTS, "//conditions:default": [ "-Iexternal/curl/lib", "-D_GNU_SOURCE", diff --git a/third_party/double_conversion.BUILD b/third_party/double_conversion.BUILD index 9f905216c0..d875a1a2b5 100644 --- a/third_party/double_conversion.BUILD +++ b/third_party/double_conversion.BUILD @@ -4,6 +4,11 @@ licenses(["notice"]) exports_files(["LICENSE"]) +config_setting( + name = "windows", + values = {"cpu": "x64_windows"}, +) + cc_library( name = "double-conversion", srcs = [ @@ -28,11 +33,10 @@ cc_library( "double-conversion/ieee.h", "double-conversion/strtod.h", ], - includes = [ - ".", - ], - linkopts = [ - "-lm", - ], + includes = ["."], + linkopts = select({ + ":windows": [], + "//conditions:default": ["-lm"], + }), visibility = ["//visibility:public"], ) diff --git a/third_party/farmhash.BUILD b/third_party/farmhash.BUILD index a51e1511c1..4b8464684a 100644 --- a/third_party/farmhash.BUILD +++ b/third_party/farmhash.BUILD @@ -3,13 +3,6 @@ licenses(["notice"]) # MIT exports_files(["COPYING"]) config_setting( - name = "windows_msvc", - values = { - "cpu": "x64_windows_msvc", - }, -) - -config_setting( name = "windows", values = { "cpu": "x64_windows", @@ -23,7 +16,6 @@ cc_library( # Disable __builtin_expect support on Windows copts = select({ ":windows": ["/DFARMHASH_OPTIONAL_BUILTIN_EXPECT"], - ":windows_msvc": ["/DFARMHASH_OPTIONAL_BUILTIN_EXPECT"], "//conditions:default": [], }), includes = ["src/."], diff --git a/third_party/fft2d/fft2d.BUILD b/third_party/fft2d/fft2d.BUILD index 3dbd36aec0..74dd3112fc 100644 --- a/third_party/fft2d/fft2d.BUILD +++ b/third_party/fft2d/fft2d.BUILD @@ -14,6 +14,11 @@ FFT2D_SRCS = [ "fft/fftsg.c", ] +config_setting( + name = "windows", + values = {"cpu": "x64_windows"}, +) + # This is the main 2D FFT library. The 2D FFTs in this library call # 1D FFTs. In addition, fast DCTs are provided for the special case # of 8x8 and 16x16. This code in this library is referred to as @@ -21,7 +26,10 @@ FFT2D_SRCS = [ cc_library( name = "fft2d", srcs = FFT2D_SRCS, - linkopts = ["-lm"], + linkopts = select({ + ":windows": [], + "//conditions:default": ["-lm"], + }), ) objc_library( diff --git a/third_party/flatbuffers/flatbuffers.BUILD b/third_party/flatbuffers/flatbuffers.BUILD index 639dff2cd0..4a3701e893 100644 --- a/third_party/flatbuffers/flatbuffers.BUILD +++ b/third_party/flatbuffers/flatbuffers.BUILD @@ -12,12 +12,14 @@ config_setting( visibility = ["//visibility:public"], ) -FLATBUFFERS_COPTS = [ - "-fexceptions", -] + select({ - "@bazel_tools//src:windows": [], - "@bazel_tools//src:windows_msvc": [], - "//conditions:default": ["-Wno-implicit-fallthrough"], +config_setting( + name = "windows", + values = {"cpu": "x64_windows"}, +) + +FLATBUFFERS_COPTS = select({ + ":windows": [], + "//conditions:default": ["-Wno-implicit-fallthrough", "-fexceptions"], }) # Public flatc library to compile flatbuffer files at runtime. @@ -121,6 +123,7 @@ cc_binary( ":freebsd": [ "-lm", ], + ":windows": [], "//conditions:default": [ "-lm", "-ldl", diff --git a/third_party/gif.BUILD b/third_party/gif.BUILD index 78fbd6c0e0..cbe730fe10 100644 --- a/third_party/gif.BUILD +++ b/third_party/gif.BUILD @@ -21,7 +21,6 @@ cc_library( ], hdrs = ["lib/gif_lib.h"], defines = select({ - #"@org_tensorflow//tensorflow:android": [ ":android": [ "S_IREAD=S_IRUSR", "S_IWRITE=S_IWUSR", @@ -33,7 +32,6 @@ cc_library( visibility = ["//visibility:public"], deps = select({ ":windows": [":windows_polyfill"], - ":windows_msvc": [":windows_polyfill"], "//conditions:default": [], }), ) @@ -51,13 +49,6 @@ genrule( ) config_setting( - name = "windows_msvc", - values = { - "cpu": "x64_windows_msvc", - }, -) - -config_setting( name = "windows", values = { "cpu": "x64_windows", diff --git a/third_party/jpeg/jpeg.BUILD b/third_party/jpeg/jpeg.BUILD index b36295ad06..96e7ac061c 100644 --- a/third_party/jpeg/jpeg.BUILD +++ b/third_party/jpeg/jpeg.BUILD @@ -22,7 +22,6 @@ libjpegturbo_copts = select({ "-w", ], ":windows": WIN_COPTS, - ":windows_msvc": WIN_COPTS, "//conditions:default": [ "-O3", "-w", @@ -425,7 +424,6 @@ genrule( outs = ["jconfig.h"], cmd = select({ ":windows": "cp $(location jconfig_win.h) $@", - ":windows_msvc": "cp $(location jconfig_win.h) $@", ":k8": "cp $(location jconfig_nowin_simd.h) $@", ":armeabi-v7a": "cp $(location jconfig_nowin_simd.h) $@", ":arm64-v8a": "cp $(location jconfig_nowin_simd.h) $@", @@ -443,7 +441,6 @@ genrule( outs = ["jconfigint.h"], cmd = select({ ":windows": "cp $(location jconfigint_win.h) $@", - ":windows_msvc": "cp $(location jconfigint_win.h) $@", "//conditions:default": "cp $(location jconfigint_nowin.h) $@", }), ) @@ -544,11 +541,6 @@ config_setting( ) config_setting( - name = "windows_msvc", - values = {"cpu": "x64_windows_msvc"}, -) - -config_setting( name = "linux_ppc64le", values = {"cpu": "ppc"}, ) diff --git a/third_party/lmdb.BUILD b/third_party/lmdb.BUILD index 9b3e1d97c8..f36a698ee3 100644 --- a/third_party/lmdb.BUILD +++ b/third_party/lmdb.BUILD @@ -20,7 +20,6 @@ cc_library( ], linkopts = select({ ":windows": ["-DEFAULTLIB:advapi32.lib"], # InitializeSecurityDescriptor, SetSecurityDescriptorDacl - ":windows_msvc": ["-DEFAULTLIB:advapi32.lib"], "//conditions:default": ["-lpthread"], }), visibility = ["//visibility:public"], @@ -30,8 +29,3 @@ config_setting( name = "windows", values = {"cpu": "x64_windows"}, ) - -config_setting( - name = "windows_msvc", - values = {"cpu": "x64_windows_msvc"}, -) diff --git a/third_party/nasm.BUILD b/third_party/nasm.BUILD index 89330eac54..2b877883b9 100644 --- a/third_party/nasm.BUILD +++ b/third_party/nasm.BUILD @@ -142,7 +142,6 @@ cc_binary( ], copts = select({ ":windows": [], - ":windows_msvc": [], "//conditions:default": [ "-w", "-std=c99", @@ -150,7 +149,6 @@ cc_binary( }), defines = select({ ":windows": [], - ":windows_msvc": [], "//conditions:default": [ "HAVE_SNPRINTF", "HAVE_SYS_TYPES_H", @@ -160,13 +158,6 @@ cc_binary( ) config_setting( - name = "windows_msvc", - values = { - "cpu": "x64_windows_msvc", - }, -) - -config_setting( name = "windows", values = { "cpu": "x64_windows", diff --git a/third_party/snappy.BUILD b/third_party/snappy.BUILD index cc11f52d0e..d93f030769 100644 --- a/third_party/snappy.BUILD +++ b/third_party/snappy.BUILD @@ -18,17 +18,9 @@ cc_library( "snappy-stubs-public.h", ], hdrs = ["snappy.h"], - copts = select({ - "@org_tensorflow//tensorflow:windows": [ - "/DHAVE_CONFIG_H", - "/EHsc", - ], - "@org_tensorflow//tensorflow:windows_msvc": [ - "/DHAVE_CONFIG_H", - "/EHsc", - ], + copts = ["-DHAVE_CONFIG_H"] + select({ + "@org_tensorflow//tensorflow:windows": [], "//conditions:default": [ - "-DHAVE_CONFIG_H", "-fno-exceptions", "-Wno-sign-compare", "-Wno-shift-negative-value", diff --git a/third_party/sqlite.BUILD b/third_party/sqlite.BUILD index 2876f305f1..8b876fb56f 100644 --- a/third_party/sqlite.BUILD +++ b/third_party/sqlite.BUILD @@ -4,7 +4,6 @@ licenses(["unencumbered"]) # Public Domain SQLITE_COPTS = [ - "-Os", "-DSQLITE_ENABLE_JSON1", "-DHAVE_DECL_STRERROR_R=1", "-DHAVE_STDINT_H=1", @@ -15,15 +14,14 @@ SQLITE_COPTS = [ "@org_tensorflow//tensorflow:windows": [ "-DSQLITE_MAX_TRIGGER_DEPTH=100", ], - "@org_tensorflow//tensorflow:windows_msvc": [ - "-DSQLITE_MAX_TRIGGER_DEPTH=100", - ], "@org_tensorflow//tensorflow:darwin": [ + "-Os", "-DHAVE_GMTIME_R=1", "-DHAVE_LOCALTIME_R=1", "-DHAVE_USLEEP=1", ], "//conditions:default": [ + "-Os", "-DHAVE_FDATASYNC=1", "-DHAVE_GMTIME_R=1", "-DHAVE_LOCALTIME_R=1", @@ -48,7 +46,7 @@ cc_library( "SQLITE_OMIT_DEPRECATED", ], linkopts = select({ - "@org_tensorflow//tensorflow:windows_msvc": [], + "@org_tensorflow//tensorflow:windows": [], "//conditions:default": [ "-ldl", "-lpthread", diff --git a/third_party/swig.BUILD b/third_party/swig.BUILD index f2f647401b..59a3d9e671 100644 --- a/third_party/swig.BUILD +++ b/third_party/swig.BUILD @@ -71,7 +71,6 @@ cc_binary( ], copts = ["$(STACK_FRAME_UNLIMITED)"] + select({ ":windows": [], - ":windows_msvc": [], "//conditions:default": [ "-Wno-parentheses", "-Wno-unused-variable", @@ -332,11 +331,6 @@ genrule( ) config_setting( - name = "windows_msvc", - values = {"cpu": "x64_windows_msvc"}, -) - -config_setting( name = "windows", values = {"cpu": "x64_windows"}, ) diff --git a/third_party/zlib.BUILD b/third_party/zlib.BUILD index e8048dd98a..33694eaaae 100644 --- a/third_party/zlib.BUILD +++ b/third_party/zlib.BUILD @@ -34,7 +34,6 @@ cc_library( hdrs = ["zlib.h"], copts = select({ "@org_tensorflow//tensorflow:windows": [], - "@org_tensorflow//tensorflow:windows_msvc": [], "//conditions:default": [ "-Wno-shift-negative-value", "-DZ_HAVE_UNISTD_H", |