Add build option for ILP64 - #184
Conversation
ef09add to
ac6e9fc
Compare
7e1f82a to
b06c721
Compare
ac6e9fc to
b39b64b
Compare
fixes compiler warning about unused function
b06c721 to
cacc4ab
Compare
There was a problem hiding this comment.
Pull request overview
Adds a Meson build-time option to compile mkl-service against MKL’s ILP64 interface, and uses that option to conditionally compile the ILP64 vs LP64 init path in the Linux preload/init extension to avoid unused-function compiler warnings.
Changes:
- Introduces a new Meson boolean option
ilp64inmeson.options. - Wires
-DMKL_ILP64into the Mesonc_argswhen the option is enabled. - Gates
_set_mkl_ilp64()/_set_mkl_lp64()compilation and selection inmkl/_mklinitmodule.c.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
mkl/_mklinitmodule.c |
Conditionally compiles and selects ILP64 vs LP64 init helper to avoid unused code paths and warnings. |
meson.options |
Adds a new ilp64 boolean build option. |
meson.build |
Attempts to add -DMKL_ILP64 to compiler args when the option is enabled. |
|
CI failures are unrelated to PR content and are likely some kind of server issue |
| @@ -0,0 +1,2 @@ | |||
| option('ilp64', type: 'boolean', value: false, | |||
There was a problem hiding this comment.
Should MKL_INT typedef in mkl/_mkl_service.pxd#L29 track the option ?
| @@ -0,0 +1,2 @@ | |||
| option('ilp64', type: 'boolean', value: false, | |||
There was a problem hiding this comment.
Should we test new option through some GitHub action?
| @@ -0,0 +1,2 @@ | |||
| option('ilp64', type: 'boolean', value: false, | |||
There was a problem hiding this comment.
Would it make sense to extend README.md and describe the new build option here?
This PR adds a
meson.optionsfile and adds a build option for ILP64.With this option added, the definition of functions for initializing MKL with the ILP64 interface are gated by ifdefs, silencing a compiler warning