blob: e6246cbe24c24f5ce4f87b951a9a7b757ad68f0e [file] [log] [blame]
# Copyright 2022 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This is the top-level BUILD.bazel for the Fuchsia platform build.
See //build/bazel/README.md for details about this file.
"""
load("//:fuchsia_build_config.bzl", "build_config")
load("//:build/bazel/toolchains/linux_sysroot.bzl", "linux_sysroot")
# This exclude is needed as there are files in the folder that have space
# in the filename. Bazel does not support spaces in filename.
_python_prebuilt_files = glob(
["prebuilt/third_party/python3/%s/**/*" % build_config.host_tag],
exclude = ["**/* *"],
)
exports_files(
# Export these files for the benefit of the //build/bazel/toolchains/clang package.
glob(["prebuilt/third_party/clang/**"]) +
glob(["prebuilt/third_party/sysroot/linux"]) +
glob(["build/bazel/**"]) +
# Used by code generators in vendor/google:
glob(["prebuilt/third_party/gn/*/gn"]) +
glob(["prebuilt/third_party/buildifier/*/buildifier"]) +
# Used by //build/bazel/toolchains/python:
_python_prebuilt_files +
# vbmeta key and metadata.
[
"third_party/android/platform/external/avb/test/data/testkey_atx_psk.pem",
"third_party/android/platform/external/avb/test/data/atx_metadata.bin",
],
)
linux_sysroot(
name = "linux_sysroot_x64",
sysroot_arch = "x86_64",
)
linux_sysroot(
name = "linux_sysroot_arm64",
sysroot_arch = "aarch64",
)
filegroup(
name = "prebuilt_python_files",
srcs = _python_prebuilt_files,
visibility = ["//build/bazel/toolchains/python:__pkg__"],
)