News for hackers. Stuff that matters.
Re:Evaluating Bazel for building Firefox by vlovich123 on Tuesday October 29, 2019 @03:42PM (#21391218)
On any large team your compiler should be checked into revision control or have a way to fetch a specific artifact & have that pointer checked in. That way you're guaranteeing everyone is using the right thing.
Re:Evaluating Bazel for building Firefox by theamk on Tuesday October 29, 2019 @04:01PM (#21391374)
Are you talking in general, or bazel specifically?

Because in general yes, I agree, it would be nice. Probably not in source control though -- putting in compilers + libraries will make checkouts very slow, git is not really designed for tens of gigabytes of stuff.

For bazel specifically, this is not really well supported. The default rules and all examples just trust system-installed compilers.

There is ongoing work on building in docker (with all the corresponding security issues), and there are rumors that Google internal version has some sort of magic, but this is not a "mainstream" configuration.

Re:Evaluating Bazel for building Firefox by kornholi on Tuesday October 29, 2019 @05:30PM (#21392276)
That's not exactly true, for example see https://github.com/grailbio/bazel-toolchain
Re:Evaluating Bazel for building Firefox by theamk on Tuesday October 29, 2019 @07:09PM (#21393054)
I am glad there is work going towards bazel-ifying the toolchain! And maybe now that 1.0 is out, we will see more work like this.

However, I think my point still stands -- this work looks pretty experimental. And most tutorials, including bazel's own [0], recommend using default configuration, which uses system compiler. And most of the examples I have seen also rely on system compiler.

[0] https://docs.bazel.build/versions/master/tutorial/cpp.html

Re:Evaluating Bazel for building Firefox by rfoo on Thursday November 07, 2019 @03:09PM (#21476828)
For the record, in the beginning Bazel does not support using auto-configured system compiler at all. The only thing it supports is using a controlled build environment and hardcode all paths (including compiler paths), or using a checked-in toolchain. But at a later stage a dumb autoconf-y "detect system toolchain and try to use it" thing was added and it became default.

This is because configuring a checked-in toolchain in Bazel needs tremendous effort and very specific knowledge about something 99.9% of developers does not know and DOES NOT WANT to know or spend their time on.