aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/def_parser/BUILD
diff options
context:
space:
mode:
authorGravatar Yun Peng <pcloudy@google.com>2017-08-25 09:59:14 +0200
committerGravatar Yun Peng <pcloudy@google.com>2017-08-28 09:37:47 +0200
commit66437a0173488ca4e77aab8c41d5454871c8c6a2 (patch)
tree3527d0aff2c40c5be751aa972d880b27e6eb6aa2 /third_party/def_parser/BUILD
parent9e3a3e2f6a16288febc74a4a3c9086c995f6aa5a (diff)
Windows: Implementing C++ DEF parser
C++ DEF parser can generating a DEF file from a object file, which can be used to export symbols during linking DLL on Windows. This parser is based on an implementation in CMake See https://github.com/Kitware/CMake/blob/master/Source/bindexplib.cxx A few changes has been made to make it work better. Usage: output_deffile dllname [objfile ...] [input_deffile ...] [@paramfile ...] output_deffile: the output DEF file dllname: the DLL name this DEF file is used for, if dllname is not empty string (eg. ""), def_parser writes an 'LIBRARY <dllname>' entry into DEF file. objfile: a object file, def_parser parses this file to find symbols, then merges them into final result. Can apppear multiple times. input_deffile: an existing def file, def_parser merges all symbols in this file. Can appear multiple times. @paramfile: a parameter file that can contain objfile and input_deffile Can appear multiple time. Change-Id: I0ee65fa3119ecae2ea195b707af5690e4bc6a6c2
Diffstat (limited to 'third_party/def_parser/BUILD')
-rw-r--r--third_party/def_parser/BUILD25
1 files changed, 25 insertions, 0 deletions
diff --git a/third_party/def_parser/BUILD b/third_party/def_parser/BUILD
new file mode 100644
index 0000000000..95e9aec5ba
--- /dev/null
+++ b/third_party/def_parser/BUILD
@@ -0,0 +1,25 @@
+licenses(["notice"]) # 3-clause BSD
+
+cc_library(
+ name = "def_parser_lib",
+ srcs = ["def_parser.cc"],
+ hdrs = ["def_parser.h"],
+ deps = [
+ "//src/main/cpp/util:file",
+ ],
+)
+
+cc_binary(
+ name = "def_parser",
+ srcs = ["def_parser_main.cc"],
+ deps = [
+ ":def_parser_lib",
+ ],
+)
+
+py_test(
+ name = "def_parser_test",
+ srcs = ["def_parser_test.py"],
+ data = [":def_parser"],
+ deps = ["//src/test/py/bazel:test_base"],
+)