bazel-contrib / rules_foreign_cc

Build rules for interfacing with "foreign" (non-Bazel) build systems (CMake, configure-make, GNU Make, boost, ninja, Meson)
https://bazel-contrib.github.io/rules_foreign_cc
Apache License 2.0
669 stars 247 forks source link

No bzlmod example #1130

Open louwers opened 10 months ago

louwers commented 10 months ago

The setup guide only explains how to use rules_foreign_cc with WORKSPACE, not with bzlmod.

https://bazelbuild.github.io/rules_foreign_cc/main/index.html#setup

louwers commented 10 months ago

OK that is actually super easy. Would still be good to mention it in the Setup guide!

attilaolah commented 10 months ago

It is indeed quite easy to use rules_foreign_cc from MODULE.bazel, however, it comes with some limitations, namely you don't have much control over which toolchains are registered — you get the defaults. For example, if you want to avoid using the built tools, currently your only option is to use a workspace file, as far as I'm aware.