[Bazel/MSVC] Cleanup -ldl/-lm flags for MSVC
This commit is contained in:
parent
26cd1d1d06
commit
1dc5772b08
@ -2477,13 +2477,11 @@ tf_cuda_library(
|
|||||||
hdrs = FRAMEWORK_INTERNAL_PUBLIC_HEADERS,
|
hdrs = FRAMEWORK_INTERNAL_PUBLIC_HEADERS,
|
||||||
copts = tf_copts(),
|
copts = tf_copts(),
|
||||||
linkopts = select({
|
linkopts = select({
|
||||||
"//tensorflow:freebsd": [],
|
"//tensorflow:freebsd": ["-lm"],
|
||||||
"//tensorflow:windows": [],
|
"//tensorflow:windows": [],
|
||||||
"//tensorflow:windows_msvc": [],
|
"//tensorflow:windows_msvc": [],
|
||||||
"//conditions:default": ["-ldl"],
|
"//conditions:default": ["-ldl", "-lm"],
|
||||||
}) + [
|
}),
|
||||||
"-lm",
|
|
||||||
],
|
|
||||||
deps = [
|
deps = [
|
||||||
":lib",
|
":lib",
|
||||||
":lib_internal",
|
":lib_internal",
|
||||||
|
16
third_party/double_conversion.BUILD
vendored
16
third_party/double_conversion.BUILD
vendored
@ -4,6 +4,11 @@ licenses(["notice"])
|
|||||||
|
|
||||||
exports_files(["LICENSE"])
|
exports_files(["LICENSE"])
|
||||||
|
|
||||||
|
config_setting(
|
||||||
|
name = "windows",
|
||||||
|
values = {"cpu": "x64_windows"},
|
||||||
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "double-conversion",
|
name = "double-conversion",
|
||||||
srcs = [
|
srcs = [
|
||||||
@ -28,11 +33,10 @@ cc_library(
|
|||||||
"double-conversion/ieee.h",
|
"double-conversion/ieee.h",
|
||||||
"double-conversion/strtod.h",
|
"double-conversion/strtod.h",
|
||||||
],
|
],
|
||||||
includes = [
|
includes = ["."],
|
||||||
".",
|
linkopts = select({
|
||||||
],
|
":windows": [],
|
||||||
linkopts = [
|
"//conditions:default": ["-lm"],
|
||||||
"-lm",
|
}),
|
||||||
],
|
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
10
third_party/fft2d/fft2d.BUILD
vendored
10
third_party/fft2d/fft2d.BUILD
vendored
@ -14,6 +14,11 @@ FFT2D_SRCS = [
|
|||||||
"fft/fftsg.c",
|
"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
|
# 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
|
# 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
|
# of 8x8 and 16x16. This code in this library is referred to as
|
||||||
@ -21,7 +26,10 @@ FFT2D_SRCS = [
|
|||||||
cc_library(
|
cc_library(
|
||||||
name = "fft2d",
|
name = "fft2d",
|
||||||
srcs = FFT2D_SRCS,
|
srcs = FFT2D_SRCS,
|
||||||
linkopts = ["-lm"],
|
linkopts = select({
|
||||||
|
":windows": [],
|
||||||
|
"//conditions:default": ["-lm"],
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
objc_library(
|
objc_library(
|
||||||
|
12
third_party/flatbuffers/flatbuffers.BUILD
vendored
12
third_party/flatbuffers/flatbuffers.BUILD
vendored
@ -12,12 +12,15 @@ config_setting(
|
|||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|
||||||
FLATBUFFERS_COPTS = [
|
config_setting(
|
||||||
"-fexceptions",
|
name = "windows",
|
||||||
] + select({
|
values = {"cpu": "x64_windows"},
|
||||||
|
)
|
||||||
|
|
||||||
|
FLATBUFFERS_COPTS = select({
|
||||||
"@bazel_tools//src:windows": [],
|
"@bazel_tools//src:windows": [],
|
||||||
"@bazel_tools//src:windows_msvc": [],
|
"@bazel_tools//src:windows_msvc": [],
|
||||||
"//conditions:default": ["-Wno-implicit-fallthrough"],
|
"//conditions:default": ["-Wno-implicit-fallthrough", "-fexceptions"],
|
||||||
})
|
})
|
||||||
|
|
||||||
# Public flatc library to compile flatbuffer files at runtime.
|
# Public flatc library to compile flatbuffer files at runtime.
|
||||||
@ -121,6 +124,7 @@ cc_binary(
|
|||||||
":freebsd": [
|
":freebsd": [
|
||||||
"-lm",
|
"-lm",
|
||||||
],
|
],
|
||||||
|
":windows": [],
|
||||||
"//conditions:default": [
|
"//conditions:default": [
|
||||||
"-lm",
|
"-lm",
|
||||||
"-ldl",
|
"-ldl",
|
||||||
|
13
third_party/snappy.BUILD
vendored
13
third_party/snappy.BUILD
vendored
@ -18,17 +18,10 @@ cc_library(
|
|||||||
"snappy-stubs-public.h",
|
"snappy-stubs-public.h",
|
||||||
],
|
],
|
||||||
hdrs = ["snappy.h"],
|
hdrs = ["snappy.h"],
|
||||||
copts = select({
|
copts = ["-DHAVE_CONFIG_H"] + select({
|
||||||
"@org_tensorflow//tensorflow:windows": [
|
"@org_tensorflow//tensorflow:windows": [],
|
||||||
"/DHAVE_CONFIG_H",
|
"@org_tensorflow//tensorflow:windows_msvc": [],
|
||||||
"/EHsc",
|
|
||||||
],
|
|
||||||
"@org_tensorflow//tensorflow:windows_msvc": [
|
|
||||||
"/DHAVE_CONFIG_H",
|
|
||||||
"/EHsc",
|
|
||||||
],
|
|
||||||
"//conditions:default": [
|
"//conditions:default": [
|
||||||
"-DHAVE_CONFIG_H",
|
|
||||||
"-fno-exceptions",
|
"-fno-exceptions",
|
||||||
"-Wno-sign-compare",
|
"-Wno-sign-compare",
|
||||||
"-Wno-shift-negative-value",
|
"-Wno-shift-negative-value",
|
||||||
|
Loading…
Reference in New Issue
Block a user