From 63537d518790132eac86659169c256ac1bf247be Mon Sep 17 00:00:00 2001 From: Jeff McGlynn Date: Wed, 23 Jan 2019 16:03:11 -0800 Subject: Update to build with the latest version of bazel * http_archive and git_repository are now skylark rules, update to use them. * new_http_archive has been merged with http_archive, and takes a label for build_file instead of a path. Add an empty third_party/BUILD file so that we can reference the label. * Rename tools/bazel.rc to .bazelrc --- .bazelrc | 6 ++++++ WORKSPACE | 7 +++++-- third_party/BUILD | 0 tools/bazel.rc | 6 ------ 4 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 .bazelrc create mode 100644 third_party/BUILD delete mode 100644 tools/bazel.rc diff --git a/.bazelrc b/.bazelrc new file mode 100644 index 0000000..e47b006 --- /dev/null +++ b/.bazelrc @@ -0,0 +1,6 @@ +# For building with the clang-specific flavor of ASAN. +build:clang-asan --client_env=CC=clang-5.0 +build:clang-asan --copt -g3 +build:clang-asan --copt -fsanitize=address +build:clang-asan --linkopt -fsanitize=address +build:clang-asan --copt -fno-omit-frame-pointer diff --git a/WORKSPACE b/WORKSPACE index 77d6a69..250f9ad 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -12,17 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. +load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + git_repository( name = "gtest", remote = "https://github.com/google/googletest.git", commit = "ba96d0b1161f540656efdaed035b3c062b60e006", ) -new_http_archive( +http_archive( name = "honggfuzz", url = "https://github.com/google/honggfuzz/archive/1.6.zip", sha256 = "c331ac5beebe526bced3043ed3012109e439315b7d74d72760b0aa6d08cc05d2", - build_file = "third_party/honggfuzz.BUILD", + build_file = "//third_party:honggfuzz.BUILD", strip_prefix = "honggfuzz-1.6", ) diff --git a/third_party/BUILD b/third_party/BUILD new file mode 100644 index 0000000..e69de29 diff --git a/tools/bazel.rc b/tools/bazel.rc deleted file mode 100644 index e47b006..0000000 --- a/tools/bazel.rc +++ /dev/null @@ -1,6 +0,0 @@ -# For building with the clang-specific flavor of ASAN. -build:clang-asan --client_env=CC=clang-5.0 -build:clang-asan --copt -g3 -build:clang-asan --copt -fsanitize=address -build:clang-asan --linkopt -fsanitize=address -build:clang-asan --copt -fno-omit-frame-pointer -- cgit v1.2.3