diff options
author | 2015-05-28 11:12:31 +0000 | |
---|---|---|
committer | 2015-05-28 14:33:37 +0000 | |
commit | 084411250036cb5724a6cfe8c65744b679cb436e (patch) | |
tree | 87a79459c1eadca68093d6b9d6f022d7c21886ce /third_party/ijar/BUILD | |
parent | 7ad2f099a7c4a6095833b616e5ee2a19f3874546 (diff) |
Refactor ZIP implementation of ijar
It extracts Zip/Unzip methods of ijar in a separate
library. A zipper binary is provided to test that
implementation outside. Note that this implementation
does not compute CRC-32 and unzip will complain on
file zipped with it (but Java won't complain).
The error handling has been replaced to use proper error
reporting instead of launching abort()'s allover the place
so ijar's zip library can be used outside of ijar.
Finally, support for ZIP preamble has been added to
handle self-extractable ZIP files.
--
Change-Id: I833034b4c0054925bada75102fe040db875da789
Reviewed-on: https://bazel-review.googlesource.com/#/c/1371/
MOS_MIGRATED_REVID=94656262
Diffstat (limited to 'third_party/ijar/BUILD')
-rw-r--r-- | third_party/ijar/BUILD | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/third_party/ijar/BUILD b/third_party/ijar/BUILD index 882f79fbde..1ab0975c02 100644 --- a/third_party/ijar/BUILD +++ b/third_party/ijar/BUILD @@ -7,12 +7,28 @@ package( licenses(["notice"]) # Apache 2.0 -cc_binary( - name = "ijar", - srcs = glob([ - "*.cc", - "*.h", - ]), +cc_library( + name = "zip", + srcs = ["zip.cc"], + hdrs = [ + "common.h", + "zip.h", + ], # TODO(bazel-team): we should replace the -lz flag. linkopts = ["-lz"], ) + +cc_binary( + name = "zipper", + srcs = ["zip_main.cc"], + deps = [":zip"], +) + +cc_binary( + name = "ijar", + srcs = [ + "classfile.cc", + "ijar.cc", + ], + deps = [":zip"], +) |