use_repo(cc_configure, "local_config_cc", "local_config_cc_toolchains") register_toolchains("@local_config_cc_toolchains//:all") bazel_dep(name = "rules_shell", version = "0.2.0", dev_dependency = True) bazel_dep(name = "googletest", version = "1.15.2", dev_dependency = True) ...
bazel: - 6.x - 7.x tasks: verify_targets: name: "Verify build targets" platform: ${{ platform }} bazel: ${{ bazel }} build_targets: - "@rules_cc//cc/..." 0 comments on commit b6db47b Please sign in to comment. Footer...
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "rules_cc", urls = ["https://github.com/bazelbuild/rules_cc/archive/TODO"], sha256 = "TODO", ) Then, in your BUILD files, import and use the rules: load("@rules_cc//cc:defs.bzl", ...
comius:upgrade-rules_cc 2mWORKSPACE rules_shell#2354 Ivo List·comius:upgrade-rules_cc 44afe3e·Created Thu 7th Nov 2024 at 00:41 5mUpgrade WORKSPACE dependencies#2353 Ivo List·comius:upgrade-rules_cc 12c509a·Created Thu 7th Nov 2024 at 00:38 6mUpgrade rules_cc to 0.0.13#2352 Ivo ...
cc_binary( name = "my_app", srcs = ["my_app.cc"], deps = [ "//absl/base", "//absl/strings", ], ) 可以使用“...”表示package中的所有targets, 例如//test/...`表示testpackage 中的所有targets. 描述Target的语法规则是: [@workspace][//package/path][:][target] ...
下面的BUILD文件会告诉Bazel先构建hello-greet库(使用Bazel内置的cc_library)然后构建hello-world二进制文件,其中的deps属性告诉Bazel构建hello-world需要hello-greet库。 load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library") cc_library( name = "hello-greet", ...
load("@rules_cc//cc:defs.bzl", "cc_binary") cc_binary( name = "hello-world", srcs = ["hello-world.cc"], ) 第一阶段,只有一个单一的目标,它构建一个没有额外依赖项的单一源文件:stage2#如果希望将较大的项目拆分为多个目标和包,以允许快速增量构建(即仅重建已更改的内容)并通过构建项目的...
cc_binary( name = "myecho", srcs = ["myecho.cc"], visibility = ["//visibility:public"] ) 在文件 generate_files/BUILD 中定义规则,通过调用生成的 myecho 程序来创建文件: genrule( name = "hello", outs = ["hello.txt"], cmd = "$(location //myecho) Hello World! > $@", tools = [...
Documentation for all rules and providers are available at:https://bazel-contrib.github.io/rules_foreign_cc/ Bazel versions compatibility Works with Bazel after 5.4.0. Note that the rules may be compatible with older versions of Bazel but support may break in future changes as these older versi...
Emit BAZEL_CURRENT_REPOSITORY when using @rules_cc//cc/runfiles (#25424) Permit literal dicts as extra keyword args in MODULE.bazel (#25614) Java Use runfiles path instead of root relative path in JavaStarlarkCommon.collectNativeLibsDirs (#25548) ...