diff options
author | David Ostrovsky <david@ostrovsky.org> | 2019-05-08 22:19:32 +0200 |
---|---|---|
committer | David Ostrovsky <david@ostrovsky.org> | 2019-05-08 23:23:51 +0200 |
commit | c8753b37b971bee37cfb5b4e1905a605e6ad1dc5 (patch) | |
tree | ed84b00f61125b0314e61fb950641bf024304cfd | |
parent | be1d0577a71c0d3630b7ba8e641a7ca871c25a46 (diff) |
Update rules_closure to latest version
The latest rules closure version exposed zlib dependency in its own
repository.bzl file, so that we can remove it from the build tool
chain: [1]. We also have to omit bazel_skylib fetching, because this
dependency already fetched in WORKSPACE for minimum supported version
checking.
[1] https://github.com/bazelbuild/rules_closure/pull/363
Change-Id: I9e2a695594a3e9b857be8f7fca4359f5c3a4b88d
-rw-r--r-- | WORKSPACE | 21 | ||||
-rw-r--r-- | lib/zlib/BUILD | 60 |
2 files changed, 4 insertions, 77 deletions
@@ -14,23 +14,9 @@ http_archive( http_archive( name = "io_bazel_rules_closure", - sha256 = "1c05fea22c9630cf1047f25d008780756373a60ddd4d2a6993cf9858279c5da6", - strip_prefix = "rules_closure-50d3dc9e6d27a5577a0f95708466718825d579f4", - urls = ["https://github.com/bazelbuild/rules_closure/archive/50d3dc9e6d27a5577a0f95708466718825d579f4.tar.gz"], -) - -# Transitive dependency of rules_closure and protobuf -http_archive( - name = "net_zlib", - build_file = "//:lib/zlib/BUILD", - sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1", - strip_prefix = "zlib-1.2.11", - urls = ["https://zlib.net/zlib-1.2.11.tar.gz"], -) - -bind( - name = "zlib", - actual = "@net_zlib//:zlib", + sha256 = "bdb00831682cd0923df36e19b01619b8230896d582f16304a937d8dc8270b1b6", + strip_prefix = "rules_closure-ad75d7cc1cff0e845cd83683881915d995bd75b2", + urls = ["https://github.com/bazelbuild/rules_closure/archive/ad75d7cc1cff0e845cd83683881915d995bd75b2.tar.gz"], ) # File is specific to Polymer and copied from the Closure Github -- should be @@ -53,6 +39,7 @@ load("@io_bazel_rules_closure//closure:defs.bzl", "closure_repositories") closure_repositories( omit_aopalliance = True, omit_args4j = True, + omit_bazel_skylib = True, omit_javax_inject = True, ) diff --git a/lib/zlib/BUILD b/lib/zlib/BUILD deleted file mode 100644 index f948117417..0000000000 --- a/lib/zlib/BUILD +++ /dev/null @@ -1,60 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) # BSD/MIT-like license (for zlib) - -_ZLIB_HEADERS = [ - "crc32.h", - "deflate.h", - "gzguts.h", - "inffast.h", - "inffixed.h", - "inflate.h", - "inftrees.h", - "trees.h", - "zconf.h", - "zlib.h", - "zutil.h", -] - -_ZLIB_PREFIXED_HEADERS = ["zlib/include/" + hdr for hdr in _ZLIB_HEADERS] - -# In order to limit the damage from the `includes` propagation -# via `:zlib`, copy the public headers to a subdirectory and -# expose those. -genrule( - name = "copy_public_headers", - srcs = _ZLIB_HEADERS, - outs = _ZLIB_PREFIXED_HEADERS, - cmd = "cp $(SRCS) $(@D)/zlib/include/", - visibility = ["//visibility:private"], -) - -cc_library( - name = "zlib", - srcs = [ - "adler32.c", - "compress.c", - "crc32.c", - "deflate.c", - "gzclose.c", - "gzlib.c", - "gzread.c", - "gzwrite.c", - "infback.c", - "inffast.c", - "inflate.c", - "inftrees.c", - "trees.c", - "uncompr.c", - "zutil.c", - # Include the un-prefixed headers in srcs to work - # around the fact that zlib isn't consistent in its - # choice of <> or "" delimiter when including itself. - ] + _ZLIB_HEADERS, - hdrs = _ZLIB_PREFIXED_HEADERS, - copts = [ - "-Wno-unused-variable", - "-Wno-implicit-function-declaration", - ], - includes = ["zlib/include/"], -) |