blob: a4a320437f2cf9e32e7667e1653e178d1b34b47c [file] [log] [blame]
# -------------------------------------------------------------------------
# Vulkan Conformance Tests
# ------------------------
#
# Copyright (c) 2022 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# --------------------------------------------------------------------
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
http_archive(
name = "bazel_skylib",
sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
],
)
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()
load("@bazel_skylib//lib:versions.bzl", "versions")
versions.check(minimum_bazel_version = "5.1.0")
git_repository(
name = "rules_fuchsia",
commit = "864b80e94ac37705c3f328f06e683858b719d5e7",
remote = "https://fuchsia.googlesource.com/sdk-integration",
shallow_since = "1666281755 +0000",
strip_prefix = "bazel_rules_fuchsia",
)
load(
"@rules_fuchsia//fuchsia:deps.bzl",
"fuchsia_clang_repository",
"fuchsia_sdk_repository",
"rules_fuchsia_deps",
)
rules_fuchsia_deps()
fuchsia_sdk_repository(
name = "fuchsia_sdk",
)
register_toolchains("@fuchsia_sdk//:fuchsia_toolchain_sdk")
fuchsia_clang_repository(
name = "fuchsia_clang",
)
load("@fuchsia_clang//:defs.bzl", "register_clang_toolchains")
register_clang_toolchains()
http_archive(
name = "rules_foreign_cc",
patch_args = ["-p1"],
# Patch rules_foreign_cc to avoid deleting the temporary directory, to avoid
# recompiling everything in incremental builds. See
# https://github.com/bazelbuild/rules_foreign_cc/issues/963
patches = ["rules_foreign_cc_patch.diff"],
sha256 = "fa3a6638443ac7c16e236c60f4405b09b26cf3008626da77eb03d7ec7aa60ea8",
strip_prefix = "rules_foreign_cc-9e70029a5c0a910099e3b5978c30d9a8fae6dc91",
url = "https://github.com/bazelbuild/rules_foreign_cc/archive/9e70029a5c0a910099e3b5978c30d9a8fae6dc91.tar.gz",
)
load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
rules_foreign_cc_dependencies()
# Instead of putting BUILD.bazel at the root of the repo, make the root repo a
# subrepo. This avoids a collision between the external/ directory in the repo
# and the one bazel uses to hold dependencies.
new_local_repository(
name = "src",
build_file = "BUILD.src",
path = "../..",
)