Re:GCC 8.2 Released
by ebikelaw on Thursday July 26, 2018 @11:01AM
(#17617986)
You could build with bazel, which ships compiler configs for clang and gcc on linux (among other combinations) in its "CROSSTOOL"[1] file. Then it's trivial to switch compilers with one argument. This feature is a result of Google's years-long support of both GCC and clang for its own build, test, and release.
1: https://github.com/bazelbuild/bazel/wiki/Building-with-a-cus...
[ Parent
| on HN ]
Re:GCC 8.2 Released
by HelloNurse on Thursday July 26, 2018 @12:08PM
(#17618535)
Sorry, I lost you at "bazel".
Do you believe constructing clang command lines in addition to gcc command lines is harder than setting up a particularly complex build tool like Bazel? Not to mention that it doesn't appear to support GCC and Clang on Windows.
Bazel comes with an installer package that you click and run. I didn't find it that complicated. It comes out of the box with CROSSTOOL support for GCC, clang, and MSVC on Windows, among dozens of other toolchains.
https://github.com/bazelbuild/bazel/blob/master/tools/cpp/CR...
Re:GCC 8.2 Released
by HelloNurse on Thursday July 26, 2018 @12:58PM
(#17618937)
The official documentation at https://docs.bazel.build/versions/master/windows.html says:
Build C++
To build C++ targets, you need:
•The Visual C++ compiler.
Whether the developers gave up on the Mingw64 GCC and Clang toolchains or it's a documentation mistake, this statement places Bazel support for Windows in the "don't touch with a 10' pole" category.
But my point was that adopting Bazel is obviously far more complex than adapting existing build scripts and build script generators for Make, Cmake, Ninja etc to use Clang.