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.

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

Depends on: https://git.openjdk.org/jdk/pull/13079

Commit messages:
 - use only jdk.CABI property
 - use extra props to check for linker
 - Add fallbackLinker vmprop

Changes: https://git.openjdk.org/jdk/pull/13429/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13429&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8304888
  Stats: 99 lines in 50 files changed: 17 ins; 3 del; 79 mod
  Patch: https://git.openjdk.org/jdk/pull/13429.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13429/head:pull/13429

PR: https://git.openjdk.org/jdk/pull/13429

Reply via email to