[code-reflection] Integrated: Add platform capability checks to bld and mkpoms
Gary Frost
gfrost at openjdk.org
Fri Dec 6 13:27:35 UTC 2024
On Fri, 6 Dec 2024 13:22:04 GMT, Gary Frost <gfrost at openjdk.org> wrote:
> Added platform capability checking to bld and mkpoms
>
> This allows the build to determine if the platform say has OpenCL/CUDA/OpenGL etc.
>
> We piggy back on cmake to do this. via CMakeProbe class.
>
> We pass the list of requested capabilities to CMakeProbe, which builds a simple CMakeLists.txt, executes and extracts its state (basically collects all of the CMake internal Vars). The vars are passed to each capability and individual cababilities can use these vars to determine whether the capabity exists, and to determine usefil unfi (where are the header files for OpenCL for instance).
>
> So now nbody example (which needs opencl and opengl extracted via jextract) will only attempt to build on platforms with these capabilities.
>
> In future we may need to support capabities that cmake can't help us with. Such as HIP
This pull request has now been integrated.
Changeset: 8abfd954
Author: Gary Frost <gfrost at openjdk.org>
URL: https://git.openjdk.org/babylon/commit/8abfd95442f999a60dc960fb164c69107ae84644
Stats: 1101 lines in 8 files changed: 656 ins; 179 del; 266 mod
Add platform capability checks to bld and mkpoms
-------------
PR: https://git.openjdk.org/babylon/pull/292
More information about the babylon-dev
mailing list