Fix build error, where nccl requires -lrt link option (#7271)
* Fix build error, where nccl requires -lrt link option * Remove config_setting defines in nccl.BUILD and curl.BUILD * Fix typo in curl.BUILD
This commit is contained in:
parent
807f449bf5
commit
4c2cfa7ebb
46
third_party/curl.BUILD
vendored
46
third_party/curl.BUILD
vendored
@ -204,13 +204,13 @@ cc_library(
|
||||
"lib/wildcard.h",
|
||||
"lib/x509asn1.h",
|
||||
] + select({
|
||||
":darwin": [
|
||||
"@//tensorflow:darwin": [
|
||||
"lib/vtls/darwinssl.c",
|
||||
],
|
||||
":ios": [
|
||||
"@//tensorflow:ios": [
|
||||
"lib/vtls/darwinssl.c",
|
||||
],
|
||||
":windows": [
|
||||
"@//tensorflow:windows": [
|
||||
"lib/asyn-thread.c",
|
||||
"lib/inet_ntop.c",
|
||||
"lib/system_win32.c",
|
||||
@ -231,7 +231,7 @@ cc_library(
|
||||
"include/curl/typecheck-gcc.h",
|
||||
],
|
||||
copts = select({
|
||||
":windows": [
|
||||
"@//tensorflow:windows": [
|
||||
"/I%prefix%/curl/lib",
|
||||
"/DHAVE_CONFIG_H",
|
||||
"/DCURL_DISABLE_FTP",
|
||||
@ -255,10 +255,10 @@ cc_library(
|
||||
"-Wno-string-plus-int",
|
||||
],
|
||||
}) + select({
|
||||
":darwin": [
|
||||
"@//tensorflow:darwin": [
|
||||
"-fno-constant-cfstrings",
|
||||
],
|
||||
":windows": [
|
||||
"@//tensorflow:windows": [
|
||||
# See curl.h for discussion of write size and Windows
|
||||
"/DCURL_MAX_WRITE_SIZE=16384",
|
||||
],
|
||||
@ -268,17 +268,17 @@ cc_library(
|
||||
}),
|
||||
includes = ["include"],
|
||||
linkopts = select({
|
||||
":android": [
|
||||
"@//tensorflow:android": [
|
||||
"-pie",
|
||||
],
|
||||
":darwin": [
|
||||
"@//tensorflow:darwin": [
|
||||
"-Wl,-framework",
|
||||
"-Wl,CoreFoundation",
|
||||
"-Wl,-framework",
|
||||
"-Wl,Security",
|
||||
],
|
||||
":ios": [],
|
||||
":windows": [
|
||||
"@//tensorflow:ios": [],
|
||||
"@//tensorflow:windows": [
|
||||
"ws2_32.lib",
|
||||
],
|
||||
"//conditions:default": [
|
||||
@ -289,8 +289,8 @@ cc_library(
|
||||
deps = [
|
||||
"@zlib_archive//:zlib",
|
||||
] + select({
|
||||
":ios": [],
|
||||
":windows": [],
|
||||
"@//tensorflow:ios": [],
|
||||
"@//tensorflow:windows": [],
|
||||
"//conditions:default": [
|
||||
"@boringssl//:ssl",
|
||||
],
|
||||
@ -386,7 +386,7 @@ cc_binary(
|
||||
"src/tool_xattr.h",
|
||||
],
|
||||
copts = select({
|
||||
":windows": [
|
||||
"@//tensorflow:windows": [
|
||||
"/I%prefix%/curl/lib",
|
||||
"/DHAVE_CONFIG_H",
|
||||
"/DCURL_DISABLE_LIBCURL_OPTION",
|
||||
@ -657,23 +657,3 @@ genrule(
|
||||
"EOF",
|
||||
]),
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "ios",
|
||||
values = {"crosstool_top": "//tools/osx/crosstool:crosstool"},
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "darwin",
|
||||
values = {"cpu": "darwin"},
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "windows",
|
||||
values = {"cpu": "x64_windows_msvc"},
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "android",
|
||||
values = {"crosstool_top": "//external:android/crosstool"},
|
||||
)
|
||||
|
18
third_party/nccl.BUILD
vendored
18
third_party/nccl.BUILD
vendored
@ -43,6 +43,24 @@ cc_library(
|
||||
"-Iexternal/nccl_archive/src",
|
||||
"-O3",
|
||||
] + cuda_default_copts(),
|
||||
linkopts = select({
|
||||
"@//tensorflow:android": [
|
||||
"-pie",
|
||||
],
|
||||
"@//tensorflow:darwin": [
|
||||
"-Wl,-framework",
|
||||
"-Wl,CoreFoundation",
|
||||
"-Wl,-framework",
|
||||
"-Wl,Security",
|
||||
],
|
||||
"@//tensorflow:ios": [],
|
||||
"@//tensorflow:windows": [
|
||||
"ws2_32.lib",
|
||||
],
|
||||
"//conditions:default": [
|
||||
"-lrt",
|
||||
],
|
||||
}),
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["@local_config_cuda//cuda:cuda_headers"],
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user