diff options
author | Jeff McGlynn <jwmcglynn@google.com> | 2018-06-18 10:55:12 -0700 |
---|---|---|
committer | Jeff McGlynn <jwmcglynn@google.com> | 2018-06-18 11:39:04 -0700 |
commit | ce724a5f1c94f539a6bf956fc6431c37e97961a9 (patch) | |
tree | 88dc586a7b19aaa5ce4a9d927733510ad06d2be9 /third_party | |
parent | a37e15d3e186b2377aeeb1bbf8cf62f3615c841c (diff) |
Set up build system and add dependencies to WORKSPACE
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/honggfuzz.BUILD | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/third_party/honggfuzz.BUILD b/third_party/honggfuzz.BUILD new file mode 100644 index 0000000..67a44be --- /dev/null +++ b/third_party/honggfuzz.BUILD @@ -0,0 +1,34 @@ +config_setting( + name = "opt", + values = {"compilation_mode": "opt"} +) + +cc_library( + name = "honggfuzz", + srcs = glob([ + "libhfuzz/*.c", + "libhfcommon/*.c", + ], + exclude = ["libhfuzz/linux.c"], + ) + select({ + "@bazel_tools//src/conditions:darwin_x86_64": [], + "@bazel_tools//src/conditions:darwin": [], + "//conditions:default": ["libhfuzz/linux.c"], + }), + hdrs = glob([ + "libhfuzz/*.h", + "libhfcommon/*.h", + "honggfuzz.h", + ]), + defines = select({ + "@bazel_tools//src/conditions:darwin_x86_64": ["_HF_ARCH_DARWIN"], + "@bazel_tools//src/conditions:darwin": ["_HF_ARCH_DARWIN"], + "//conditions:default": ["_HF_ARCH_LINUX", "linux=linux"], + }) + select({ + ":opt": [], + "//conditions:default": ["DEBUG=DEBUG"], + }), + includes = ["."], + visibility = ["//visibility:public"], + linkstatic = 1 +) |