2 Star 0 Fork 0

mirrors_benjaminp/rules_foreign_cc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.bazelci
cc_configure_make
examples
for_workspace
test
toolchains_examples
.bazelrc
BUILD
README.md
WORKSPACE
additional_toolchains.bzl
fancy_platform_commands.bzl
test_platform_name_rule.bzl
tools/build_defs
.bazelignore
.gitignore
AUTHORS
BUILD
CODEOWNERS
CONTRIBUTING.md
LICENSE
README.md
WORKSPACE
workspace_definitions.bzl
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

###How to add a shell toolchain implementation for a custom platform: (to modify the fragments of generated shell script)

  • define your own shell toolchain file(s) by copying @rules_foreign_cc//tools/build_defs/shell_toolchain/toolchains/impl:linux_commands.bzl, and modifying the methods.
  • create a mapping: a list of ToolchainMapping with the mappings between created file(s) and execution or/and target platform constraints.
  • in the BUILD file of some package, call "register_mappings" macro from "@rules_foreign_cc//tools/build_defs/shell_toolchain/toolchains:defs.bzl", passing the mappings and toolchain_type_ = "@rules_foreign_cc//tools/build_defs/shell_toolchain/toolchains:shell_commands"
  • in the WORKSPACE file of your main repository, when you initialize rules_foreign_cc, pass the mappings and the package, in which BUILD file you called "register_mappings" macro

Please look how it is done in this example.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_benjaminp/rules_foreign_cc.git
git@gitee.com:mirrors_benjaminp/rules_foreign_cc.git
mirrors_benjaminp
rules_foreign_cc
rules_foreign_cc
master

搜索帮助