RFR: 8265431: Add -fdelete-null-pointer-checks to clang builds
Maxim Kartashev
github.com+28651297+mkartashev at openjdk.java.net
Mon May 24 14:15:19 UTC 2021
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.
-------------
Commit messages:
- 8265431: Add -fdelete-null-pointer-checks to clang builds
Changes: https://git.openjdk.java.net/jdk/pull/4166/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4166&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8265431
Stats: 9 lines in 1 file changed: 9 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/4166.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4166/head:pull/4166
PR: https://git.openjdk.java.net/jdk/pull/4166
More information about the build-dev
mailing list