RFR: 8265431: Add -fdelete-null-pointer-checks to clang builds

Erik Joelsson erikj at openjdk.java.net
Tue Jun 1 17:00:19 UTC 2021


On Mon, 24 May 2021 14:03:45 GMT, Maxim Kartashev <github.com+28651297+mkartashev at openjdk.org> wrote:

> This commit adds the `-fno-delete-null-pointer-checks` compiler option to clang builds, which is going to become necessary starting from clang version 12.0.0 (see the [bug report](https://bugs.openjdk.java.net/browse/JDK-8265431) for more info).
> 
> Verified on Linux (with both gcc and clang toolchains) and MacOS (with only the clang toolchain) by
> - Running configure with `--with-toolchain-type=clang`; the following appears in the configure output:
> 
> ...
> checking if BUILD_CC supports "-fno-delete-null-pointer-checks"... yes
> checking if BUILD_CXX supports "-fno-delete-null-pointer-checks"... yes
> checking if both BUILD_CC and BUILD_CXX support "-fno-delete-null-pointer-checks"... yes
> ...
> * Toolchain:      clang (clang/LLVM)
> * C Compiler:     Version 10.0.0 (at /usr/bin/clang)
> * C++ Compiler:   Version 10.0.0 (at /usr/bin/clang++)
> 
> - Successfully building `make images`. The option is actually passed down to the compiler:
> 
> $ grep fno-delete-null-pointer-checks .../jdk/build/linux-x86_64-server-release/hotspot/variant-server/libjvm/objs/*cmdline | wc -l 
> 1069
> 
> -  Running `make run-test-tier1` on Linux.

Looks good and thanks for the clarification. Make sure you update the PR title to match the new bug title (with the correct flag).

-------------

Marked as reviewed by erikj (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/4166



More information about the build-dev mailing list