blob: d709382cf732432e90b56f4ed39837d21bc4fcc2 [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//:defs.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",
] +
# Bootloader images used in partition configs for product bundles.
glob(["prebuilt/vendor/amlogic/*/firmware/**/*"]) +
# OSPO license verification tool
glob(["prebuilt/third_party/ospo/licenseclassifier/*/identify_license"]) +
# vim3 bootloader
["prebuilt/third_party/firmware/vim3/u-boot.bin.unsigned"] +
# zoneinfo resources
glob(["prebuilt/third_party/zoneinfo/**"]) +
# prebuilt drivers
glob(["prebuilt/vendor/google/drivers/**/*.far"]) +
# build/info
[
"integration/.git/HEAD",
"fuchsia_build_generated/git",
"fuchsia_build_generated/jiri_snapshot.xml",
] +
# end of list.
[],
)
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__"],
)