| load(":build_defs.bzl", "BZLMOD_ENABLED") |
| |
| package(default_visibility = ["//visibility:public"]) |
| |
| alias( |
| name = "host_platform", |
| actual = "@platforms//host" if BZLMOD_ENABLED else "@internal_platforms_do_not_use//host", |
| ) |
| |
| # Platform used for invalid or empty (e.g. builtin) Bazel actions. |
| platform( |
| name = "internal_platform", |
| visibility = ["//visibility:private"], |
| ) |
| |
| # All bzl files in the built in repo '@bazel_tools'. |
| filegroup( |
| name = "bzl_srcs", |
| srcs = [ |
| "//tools:build_defs.bzl", |
| "//tools/android:bzl_srcs", |
| "//tools/build_defs:bzl_srcs", |
| "//tools/build_rules:bzl_srcs", |
| "//tools/cpp:bzl_srcs", |
| "//tools/jdk:bzl_srcs", |
| "//tools/osx:bzl_srcs", |
| "//tools/python:bzl_srcs", |
| "//tools/res:bzl_srcs", |
| "//tools/sh:bzl_srcs", |
| "//tools/test:bzl_srcs", |
| ], |
| ) |
| |
| # Tools that Bazel subcommands (e.g. `bazel mod tidy`) depend on implicitly, |
| # but that aren't in the transitive closure of user build targets. Users who |
| # need to run these subcommands offline (e.g. with `--vendor_dir` and |
| # `--nofetch`) should include this target in their `bazel vendor` invocation: |
| # |
| # bazel vendor //... @bazel_tools//tools:tools_for_bazel_subcommands |
| # |
| # See https://github.com/bazelbuild/bazel/issues/29222. |
| filegroup( |
| name = "tools_for_bazel_subcommands", |
| srcs = [ |
| # Required by `bazel mod tidy`. Keep in sync with the label resolved |
| # in src/main/java/com/google/devtools/build/lib/bazel/bzlmod/ |
| # BazelModTidyFunction.java (search for "buildozer.exe"). |
| "@buildozer_binary//:buildozer.exe", |
| ], |
| ) |