On Tue, 11 Apr 2023 17:28:06 GMT, Jorn Vernee <jver...@openjdk.org> wrote:
> This patch adds a dedicated jtreg property to check which CABI is being used > by the JDK, which can be used both to check whether the foreign linker is > supported, and whether the fallback linker is being used. (and, possibly it > can also be use to check for a particular ABI in case we want to add ABI > specific tests). > > Checking whether the foreign linker is supported currently requires using an > unwieldy expression that checks if we are running on a platform that has a > foreign linker port. Checking for the fallback linker currently uses > `vm.flavor != "zero"` which is not always correct, since the fallback linker > can also be used on other platforms which are not `zero`. > > To initialize the property, VMProps directly reads > `jdk.internal.foreig.CABI::current()`. Since this class is in an internal > package, `--add-exports` flags are added as javac flags and VM flags for the > extra prop definitions class. This pull request has now been integrated. Changeset: a8bf2acb Author: Jorn Vernee <jver...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/a8bf2acb7db63b508ef169e42a27b9c99178cbb1 Stats: 129 lines in 50 files changed: 41 ins; 8 del; 80 mod 8304888: Add dedicated VMProps for linker and fallback linker Reviewed-by: alanb, mcimadamore ------------- PR: https://git.openjdk.org/jdk/pull/13429