Bazel is a build tool made by Google that provides a way to quickly get started with a project
and setting up a build environment. It provides incremental and hermetic builds and supports a wide variety of languages. It comes
with a basic workspace with every installation that includes some of the common libraries and tools that you'll need to get started
with your project. If you want more than what is provided you either need to add the required rules to your project or create a new
workspace which can be time consuming and, even worse, provides a potential place where you duplicate work. If you have a library
(such as GFlags that does not currently have support for Bazel and you use it in multiple projects
you'll find that you have to copy all the rules from one project to the other and if those rules ever change you'll have to keep them
all in sync. This will be true for all the common libraries that might be used. Further, Bazel only comes with support for a small
number of cross-compiler setups. This usually isn't a big deal but Bazel currently only supports Linux and OSX. If you want to build
for Windows (or any other system that you don't have access to) you'll need to cross-compile. This is where Base Workspace
comes in.
Base Worskpace
should provide more of the common libraries that you might want to use as well as cross-compilers for Windows and
OSX. It should require minimal setup beyond installing the required toolchains for the cross-compilers. It should also come with the
required documentation to get setup and integrate with your project.
- OSX
- Windows 64bit
While I do have some experience in doing this I have never had to generalize this to all projects. I also have not created a workspace before for Bazel. Normally I configure everything per project. This will take a while to figure out how to do. Further it will require a lot of documentation to get the cross-compilers setup and I still don't know how to do the OSX cross-compiler. It will also be very tough to make this work on as many systems as possible without imposing a lot of restrictions.