Skip to content

Commit

Permalink
Add SSL target to TensorFlow's Boringssl BUILD files. Also make genru…
Browse files Browse the repository at this point in the history
…le trick work when TF is imported as a submodule.

Change: 123805260
  • Loading branch information
kirilg authored and tensorflower-gardener committed Jun 1, 2016
1 parent 79254e6 commit 3f07cb2
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 1 deletion.
58 changes: 57 additions & 1 deletion boringssl.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,51 @@ licenses(["restricted"]) # OpenSSL license, partly BSD-like
# See https://boringssl.googlesource.com/boringssl/+/master/INCORPORATING.md
# on how to re-generate the list of source files.

ssl_headers = [
]

ssl_internal_headers = [
"ssl/internal.h",
"ssl/test/async_bio.h",
"ssl/test/packeted_bio.h",
"ssl/test/scoped_types.h",
"ssl/test/test_config.h",
]

ssl_sources = [
"ssl/custom_extensions.c",
"ssl/d1_both.c",
"ssl/d1_clnt.c",
"ssl/d1_lib.c",
"ssl/d1_meth.c",
"ssl/d1_pkt.c",
"ssl/d1_srtp.c",
"ssl/d1_srvr.c",
"ssl/dtls_record.c",
"ssl/pqueue/pqueue.c",
"ssl/s3_both.c",
"ssl/s3_clnt.c",
"ssl/s3_enc.c",
"ssl/s3_lib.c",
"ssl/s3_meth.c",
"ssl/s3_pkt.c",
"ssl/s3_srvr.c",
"ssl/ssl_aead_ctx.c",
"ssl/ssl_asn1.c",
"ssl/ssl_buffer.c",
"ssl/ssl_cert.c",
"ssl/ssl_cipher.c",
"ssl/ssl_ecdh.c",
"ssl/ssl_file.c",
"ssl/ssl_lib.c",
"ssl/ssl_rsa.c",
"ssl/ssl_session.c",
"ssl/ssl_stat.c",
"ssl/t1_enc.c",
"ssl/t1_lib.c",
"ssl/tls_record.c",
]

crypto_headers = [
"include/openssl/aead.h",
"include/openssl/aes.h",
Expand Down Expand Up @@ -394,7 +439,7 @@ crypto_sources = [
# A trick to take the generated err_data.c from another package.
genrule(
name = "err_data_c",
srcs = ["@//third_party/boringssl:err_data_c"],
srcs = ["//external:boringssl_err_data_c"],
outs = ["err_data.c"],
cmd = "cp $< $@",
)
Expand All @@ -408,3 +453,14 @@ cc_library(
includes = ["include"],
visibility = ["//visibility:public"],
)

cc_library(
name = "ssl",
srcs = ssl_internal_headers + ssl_sources,
hdrs = ssl_headers,
includes = ["src/include"],
visibility = ["//visibility:public"],
deps = [
":crypto",
],
)
5 changes: 5 additions & 0 deletions tensorflow/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""):
build_file = path_prefix + "boringssl.BUILD",
)

native.bind(
name = "boringssl_err_data_c",
actual = "@//" + path_prefix + "third_party/boringssl:err_data_c",
)

native.new_http_archive(
name = "avro_archive",
url = "http://www-us.apache.org/dist/avro/avro-1.8.0/cpp/avro-cpp-1.8.0.tar.gz",
Expand Down

0 comments on commit 3f07cb2

Please sign in to comment.