Convert TensorFlow's nasm dependency to new third party import method.

PiperOrigin-RevId: 216211467
This commit is contained in:
A. Unique TensorFlower 2018-10-08 10:43:54 -07:00 committed by TensorFlower Gardener
parent d1588d72a8
commit 0691d49fb6
5 changed files with 26 additions and 19 deletions

View File

@ -23,11 +23,13 @@ load(
load("//third_party/flatbuffers:workspace.bzl", flatbuffers = "repo")
load("//third_party/icu:workspace.bzl", icu = "repo")
load("//third_party/jpeg:workspace.bzl", jpeg = "repo")
load("//third_party/nasm:workspace.bzl", nasm = "repo")
def initialize_third_party():
flatbuffers()
icu()
jpeg()
nasm()
# Sanitize a dependency so that it works correctly from code that includes
# TensorFlow as a submodule.
@ -235,19 +237,6 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""):
],
)
tf_http_archive(
name = "nasm",
build_file = clean_dep("//third_party:nasm.BUILD"),
sha256 = "63ec86477ad3f0f6292325fd89e1d93aea2e2fd490070863f17d48f7cd387011",
strip_prefix = "nasm-2.13.03",
system_build_file = clean_dep("//third_party/systemlibs:nasm.BUILD"),
urls = [
"https://mirror.bazel.build/www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.bz2",
"http://pkgs.fedoraproject.org/repo/pkgs/nasm/nasm-2.13.03.tar.bz2/sha512/d7a6b4cee8dfd603d8d4c976e5287b5cc542fa0b466ff989b743276a6e28114e64289bf02a7819eca63142a5278aa6eed57773007e5f589e15768e6456a8919d/nasm-2.13.03.tar.bz2",
"http://www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.bz2",
],
)
tf_http_archive(
name = "png_archive",
build_file = clean_dep("//third_party:png.BUILD"),

1
third_party/nasm/BUILD vendored Normal file
View File

@ -0,0 +1 @@
# Needed to make this a package.

View File

@ -137,12 +137,6 @@ cc_binary(
":windows": ["config/msvc.h"],
"//conditions:default": [],
}),
includes = [
"asm",
"include",
"output",
"x86",
],
copts = select({
":windows": [],
"//conditions:default": [
@ -157,6 +151,12 @@ cc_binary(
"HAVE_SYS_TYPES_H",
],
}),
includes = [
"asm",
"include",
"output",
"x86",
],
visibility = ["@jpeg//:__pkg__"],
)

17
third_party/nasm/workspace.bzl vendored Normal file
View File

@ -0,0 +1,17 @@
"""loads the nasm library, used by TF."""
load("//third_party:repo.bzl", "third_party_http_archive")
def repo():
third_party_http_archive(
name = "nasm",
urls = [
"https://mirror.bazel.build/www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.bz2",
"http://pkgs.fedoraproject.org/repo/pkgs/nasm/nasm-2.13.03.tar.bz2/sha512/d7a6b4cee8dfd603d8d4c976e5287b5cc542fa0b466ff989b743276a6e28114e64289bf02a7819eca63142a5278aa6eed57773007e5f589e15768e6456a8919d/nasm-2.13.03.tar.bz2",
"http://www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.bz2",
],
sha256 = "63ec86477ad3f0f6292325fd89e1d93aea2e2fd490070863f17d48f7cd387011",
strip_prefix = "nasm-2.13.03",
build_file = "//third_party/nasm:BUILD.bazel",
system_build_file = "//third_party/nasm:BUILD.system",
)