8000 Merge pull request #24414 from FFY00/no-runtime-check-for-longdouble_… · numpy/numpy@8c1a4c2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8c1a4c2

Browse files
authored
Merge pull request #24414 from FFY00/no-runtime-check-for-longdouble_format
BLD: allow specifying the long double format to avoid the runtime check [skip ci]
2 parents 2c45a56 + 582a402 commit 8c1a4c2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

numpy/core/meson.build

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,9 @@ endforeach
380380
# https://github.com/numpy/numpy/blob/eead09a3d02c09374942cdc787c0b5e4fe9e7472/numpy/core/setup_common.py#L264-L434
381381
# This port is in service of solving gh-23972
382382
# as well as https://github.com/mesonbuild/meson/issues/11068
383-
longdouble_format = meson.get_compiler('c').run(
383+
longdouble_format = meson.get_external_property('longdouble_format', 'UNKNOWN')
384+
if longdouble_format == 'UNKNOWN'
385+
longdouble_format = meson.get_compiler('c').run(
384386
'''
385387
#include <stdio.h>
386388
#include <string.h>
@@ -459,7 +461,8 @@ int main(void) {
459461
}
460462
}
461463
}
462-
''').stdout()
464+
''').stdout()
465+
endif
463466
if longdouble_format == 'UNKNOWN' or longdouble_format == 'UNDEFINED'
464467
error('Unknown long double format of size: ' + cc.sizeof('long double').to_string())
465468
endif

0 commit comments

Comments
 (0)
0