[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,
|
||||
copts = tf_copts(),
|
||||
linkopts = select({
|
||||
"//tensorflow:freebsd": [],
|
||||
"//tensorflow:freebsd": ["-lm"],
|
||||
"//tensorflow:windows": [],
|
||||
"//tensorflow:windows_msvc": [],
|
||||
"//conditions:default": ["-ldl"],
|
||||
}) + [
|
||||
"-lm",
|
||||
],
|
||||
"//conditions:default": ["-ldl", "-lm"],
|
||||
}),
|
||||
deps = [
|
||||
":lib",
|
||||
":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"])
|
||||
|
||||
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"],
|
||||
)
|
||||
|
10
third_party/fft2d/fft2d.BUILD
vendored
10
third_party/fft2d/fft2d.BUILD
vendored
@ -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(
|
||||
|
12
third_party/flatbuffers/flatbuffers.BUILD
vendored
12
third_party/flatbuffers/flatbuffers.BUILD
vendored
@ -12,12 +12,15 @@ config_setting(
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
FLATBUFFERS_COPTS = [
|
||||
"-fexceptions",
|
||||
] + select({
|
||||
config_setting(
|
||||
name = "windows",
|
||||
values = {"cpu": "x64_windows"},
|
||||
)
|
||||
|
||||
FLATBUFFERS_COPTS = select({
|
||||
"@bazel_tools//src:windows": [],
|
||||
"@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.
|
||||
@ -121,6 +124,7 @@ cc_binary(
|
||||
":freebsd": [
|
||||
"-lm",
|
||||
],
|
||||
":windows": [],
|
||||
"//conditions:default": [
|
||||
"-lm",
|
||||
"-ldl",
|
||||
|
13
third_party/snappy.BUILD
vendored
13
third_party/snappy.BUILD
vendored
@ -18,17 +18,10 @@ 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": [],
|
||||
"@org_tensorflow//tensorflow:windows_msvc": [],
|
||||
"//conditions:default": [
|
||||
"-DHAVE_CONFIG_H",
|
||||
"-fno-exceptions",
|
||||
"-Wno-sign-compare",
|
||||
"-Wno-shift-negative-value",
|
||||
|
Loading…
Reference in New Issue
Block a user