Bazel 构建函数百科全书

报告问题 查看源代码

概念与术语

函数

规则

原生规则附带 Bazel 二进制文件,且不需要 load 语句。原生代码在 BUILD 文件中提供全局规则。在 .bzl 文件中,您可以在 native 模块中找到这些文件。如需了解与 Bazel 分开提供的非原生 Starlark 规则,请参阅推荐规则列表。

针对特定语言的原生广告规则

语言 二进制规则 库规则 测试规则 其他规则
Android android_binary
aar_import
android_library
android_instrumentation_test
android_local_test
android_device
android_ndk_repository
android_sdk_repository
C / C++ cc_binary
cc_import
cc_library
cc_proto_library
fdo_prefetch_hints
fdo_profile
propeller_optimize
cc_test
cc_toolchain
cc_toolchain_suite
Java java_binary
java_import
java_library
java_lite_proto_library
java_proto_library
java_test
java_package_configuration
java_plugin
java_runtime
java_toolchain
Objective-C j2objc_library
objc_import
objc_library
available_xcodes
xcode_config
xcode_version
协议缓冲区 proto_lang_toolchain
proto_library
Python py_binary
py_library
py_test
py_runtime
Shell sh_binary
sh_library
sh_test

与语言无关的原生规则

家庭 规则
其他操作
常规
平台和工具链
工作区