RFR: JDK-8303166: Disable RTTI for Hotspot when building with MSVC
Justin King
jcking at openjdk.org
Fri Feb 24 15:45:51 UTC 2023
Disable RTTI `-GR-` for Hotspot when building with MSVC. This drops the size of `jvm.dll` by roughly 1 MB. Hotspot does not rely on RTTI and it is disabled for both GCC/Clang and Open XL C/C++ already. This change disables it for MSVC, ensuring we do not accidently rely on RTTI for Windows-specific code while also decreasing the resulting binary size.
Cheers to @alexmenkov for finding the tricky root cause of why disabling RTTI was causing a subset of serviceability agent tests to fail.
-------------
Commit messages:
- Force MSVC to emit unique vtable for NotificationThread
- Disable RTTI with MSVC
Changes: https://git.openjdk.org/jdk/pull/12743/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12743&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8303166
Stats: 9 lines in 3 files changed: 7 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/12743.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/12743/head:pull/12743
PR: https://git.openjdk.org/jdk/pull/12743
More information about the build-dev
mailing list