-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
If I run `bash configure --with-toolchain-type=clang` and `make` today with `clang version 14.0.6-2` for target `x86_64-pc-linux-gnu` the build fails due to clang being more pedantic about warnings than gcc.
Some vendors have switched to using clang over gcc for custom builds of OpenJDK on Linux. Today you either have to hunt down and fix all the warnings every time you pull down changes, and maintain a patch or upstream them, or silence warnings as one notices them.
I realize OpenJDK only officially supports using gcc for Linux and forcing everybody to keep clang in mind is not feasible, nor is duplicating running all the tests via GHA. However maybe we can reach a middle ground. Is it possible to setup a GHA which just builds OpenJDK with clang on Linux but doesn't run tests? This will help ensure the build remains green and also take advantage of clang's more pedantic warnings, helping make sure code remains more easily readable.
Some vendors have switched to using clang over gcc for custom builds of OpenJDK on Linux. Today you either have to hunt down and fix all the warnings every time you pull down changes, and maintain a patch or upstream them, or silence warnings as one notices them.
I realize OpenJDK only officially supports using gcc for Linux and forcing everybody to keep clang in mind is not feasible, nor is duplicating running all the tests via GHA. However maybe we can reach a middle ground. Is it possible to setup a GHA which just builds OpenJDK with clang on Linux but doesn't run tests? This will help ensure the build remains green and also take advantage of clang's more pedantic warnings, helping make sure code remains more easily readable.