Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bazel build using different compiler

How can I specify the compiler for Bazel to use? I see the --compiler option here, but no explanation of its use.

I have read about making new toolchains, but it appears that it is per project or something. For Tensorflow in particular, I want to use a icecc install I have on my machines so I can distribute the build


1 Answers

For a wrapper around gcc, doing export CC=/path/to/icecc should just work and start using icecc with bazel 0.4.5. If icecc requires special environment variable you might have to add --action_env flags.

Note that Bazel was created to run with the Google compilation cluster and as a consequence separate each compilation action, that might interact badly with icecc assumptions.

like image 123
Damien Martin-Guillerez Avatar answered Jun 10 '26 14:06

Damien Martin-Guillerez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!