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

Mac Aarch: Excessive warnings to be ignored for build jdk

XMLWordPrintable

    • b23
    • aarch64
    • os_x

        When building OpenJDK17 or OpenJDK18 on Mac Aarch64 using the Clang compiler, there are a large number of low-priority warning messages warning of unused parameters and the like.

        Total text output on JDK17 is approximately 170mb, and the output on JDK18 is around 90mb. This feels excessive, especially when compared with the JDK11 output (under 1mb).

        After checking flags-cflags.m4, it seems we don't set BUILD_CC_DISABLE_WARNING_PREFIX to "-Wno-", which results in the buildjdk-spec.gmk file (generated from buildjdk-spec.gmk.in) not using the same set of warning suppression flags as:
        - when you're building the buildjdk and full jdk with gcc
        and
        - when you're building the full jdk with clang

        In short, I propose we set that variable in the same way we do when using the gcc compiler and when using clang for making the full jdk; ignoring the same warnings. This has been tested, and knocks the output down to under 1mb, while still producing a healthy build.

        My plan is to propose this change in the head branch before proposing a backport to 18 and 17.

              afarley Adam Farley
              afarley Adam Farley
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: