Hi, I'm a C++/SystemVerilog engineer at Altera, a ...
# welcome
r
Hi, I'm a C++/SystemVerilog engineer at Altera, a company that makes FPGAs. I'm making proposals internally that we adopt a modern build infrastructure / tooling that allows true language agnostic build system. I'm trying to get a feel for how mature Pants is, how far off the C/C++ plugin is, and how difficult it will be to add entirely new toolchain support for EDA tools like Quartus, or simulation tools such as Modelsim.
h
Hi! I would say Pants is very mature and heavily supported for Python, decently for JVM, and then it’s a mixed bag after that. Specifically, C/C++ is not in heavy demand and so that plugin is more of a labor of love that is not ready for prime time (although @wide-midnight-78598 may have a better idea of its future status). As for adding new toolchains, that is well-supported via the plugin API (which is technically not stabilized, but has been pretty stable in practice for a while) or the ad-hoc tools mechanism. There is documentation, examples, and community support for that sort of thing.
So I would say, Pants is not an off-the-shelf solution for your needs.
That said, C/C++ is less amenable to off-the-shelf treatment anyway, even with a build system (such as Bazel or make or whatever) nominally designed for it, because with those languages builds tend to be very bespoke. So “invoke clang to go .cc file to .o file” is the least of your worries, and you end up writing substantial customizations, whether it’s in Makefiles or whatever…
So I guess if your build is pretty bespoke, and you expect to be writing your own build rules regardless of underlying build system, then the Pants engine could be a good platform for you to create it on top of.
And you can then own the build and tweak it however you want.
And of course if you also have non-trivial Python code then you get benefits there.
But if you want the basic C/C++ plumbing provided for you, and a more out-of-the-box experience, then I suspect Bazel may be a better fit.
Also cc @fast-nail-55400 who has looked into things like using Pants as the main build tool but having it invoke bazel/make under the hood specifically for a native build component (mind you, that was for existing builds with those systems, I doubt you want two integration projects…)