aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party
diff options
context:
space:
mode:
authorGravatar LI Yi <liyi.novo@gmail.com>2017-02-18 01:39:43 +0800
committerGravatar Vijay Vasudevan <vrv@google.com>2017-02-17 09:39:43 -0800
commit4c2cfa7ebb05e7323bea47d36d8b36649c454335 (patch)
treeac32c288dd019cf039ab09f19dfcbf6b588a7395 /third_party
parent807f449bf53d2ac3f07e6853a3d783f7cc9ca68d (diff)
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
Diffstat (limited to 'third_party')
-rw-r--r--third_party/curl.BUILD46
-rw-r--r--third_party/nccl.BUILD18
2 files changed, 31 insertions, 33 deletions
diff --git a/third_party/curl.BUILD b/third_party/curl.BUILD
index dde8e6cdb7..557c2885eb 100644
--- a/third_party/curl.BUILD
+++ b/third_party/curl.BUILD
@@ -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"},
-)
diff --git a/third_party/nccl.BUILD b/third_party/nccl.BUILD
index bb460a05e0..bb2af7fa7d 100644
--- a/third_party/nccl.BUILD
+++ b/third_party/nccl.BUILD
@@ -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"],
)