bazel--google推出的一款开源工程编译工具-类似于make



  1. // 官网
  2. https: //www.bazel.build/
  3. // github
  4. https: //github.com/bazelbuild/bazel

Bazel可以快速地构建可靠的代码,谷歌的大多数软件都是由它来构建。Bazel支持多种语言并且跨平台,还支持自动化测试和部署、具有再现性(Reproducibility)和规模化等特征。bazel支持的平台有Ubuntu linux、Mac OS X、Windows

genrule {
    name: "[email protected]_genc++",
    tools: ["hidl-gen"],
    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hidl:system/libhidl/transport -randroid.system:system/hardware/interfaces [email protected]",
    srcs: [
        ":[email protected]_hal",
    ],
    out: [
        "android/system/net/netd/1.0/NetdAll.cpp",
    ],

}

其中genrule就是Rule的一种,通过执行指令来生成输出文件。其中name,tools,  cmd,  srcs,  为其属性。首先这条规则的名字为[email protected]_genc++

用到的tools:  hidl-gen

执行的命令:$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hidl:system/libhidl/transport -randroid.system:system/hardware/interfaces [email protected]

源文件:  [email protected]_hal

生成的输出文件:android/system/net/netd/1.0/NetdAll.cpp

猜你喜欢

转载自blog.csdn.net/weixin_38503885/article/details/80857914