I just left Google and looked at bazel to see if I could set it up in order to feel myself at home. I'm wondering if someone could point me to resources wrt the following:
1. At Google libc was in the workspace somehow under //third_party, i.e. the system compiler/libraries were not used. Unfortunately, I never looked too closely how it was done. How can I easily use a custom libc(++)/compiler?
2. How should I setup projects if I have libraries/binaries in a workspace that should be usable as dependencies also for Arduino and ARM projects? In other words, I have projects with both amd64 and arduino/arm binaries (robots) and need to specify compilers for each.
For (1) I basically see two options:
1. Include the sources in the workspace, but this seems overkill as it's quite a bit of work to write BUILD files for all non-blaze based dependencies (I assume in this case libc++ would be compiled for each binary). On the plus side, it puts everything under git for easy rollback when updating.
2. Manually put the toolchains and libraries under something like /opt/toolchains/<arch> mounted over NFS to all machines that need to compile things and somehow tell blaze to pick system headers/compilers/tools from here as well as statically link in libraries instead of using the ones provided by the system.
What would be considered best practices and wouldn't require tons of maintenance? I haven't thought about it too deeply yet, so maybe someone has a better idea?
Best,
Edvard
Hi there,
I just left Google and looked at bazel to see if I could set it up in order to feel myself at home. I'm wondering if someone could point me to resources wrt the following:
1. At Google libc was in the workspace somehow under //third_party, i.e. the system compiler/libraries were not used. Unfortunately, I never looked too closely how it was done. How can I easily use a custom libc(++)/compiler?
2. How should I setup projects if I have libraries/binaries in a workspace that should be usable as dependencies also for Arduino and ARM projects? In other words, I have projects with both amd64 and arduino/arm binaries (robots) and need to specify compilers for each.
For (1) I basically see two options:
1. Include the sources in the workspace, but this seems overkill as it's quite a bit of work to write BUILD files for all non-blaze based dependencies (I assume in this case libc++ would be compiled for each binary). On the plus side, it puts everything under git for easy rollback when updating.
2. Manually put the toolchains and libraries under something like /opt/toolchains/<arch> mounted over NFS to all machines that need to compile things and somehow tell blaze to pick system headers/compilers/tools from here as well as statically link in libraries instead of using the ones provided by the system.
What would be considered best practices and wouldn't require tons of maintenance? I haven't thought about it too deeply yet, so maybe someone has a better idea?