Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8298983

Build on GHA with clang on Linux

XMLWordPrintable

      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.

            Unassigned Unassigned
            jcking Justin King
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: