RFR: 8265431: Add -fno-delete-null-pointer-checks to clang builds

Maxim Kartashev github.com+28651297+mkartashev at openjdk.java.net
Tue Jun 1 17:34:19 UTC 2021


On Tue, 1 Jun 2021 13:23:49 GMT, Erik Joelsson <erikj 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.
>
> I left a comment in the bug that you haven't answered.

@erikj79 Thanks for reviewing! Will you be able to sponsor the PR, please?

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

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



More information about the build-dev mailing list