8000 BLD: allow specifying the long double format to avoid the runtime check · numpy/numpy@5ae1828 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5ae1828

Browse files
committed
BLD: allow specifying the long double format to avoid the runtime check
Signed-off-by: Filipe Laíns <lains@riseup.net>
1 parent fadae6d commit 5ae1828

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
@@ -373,7 +373,9 @@ endforeach
373373
# https://github.com/numpy/numpy/blob/eead09a3d02c09374942cdc787c0b5e4fe9e7472/numpy/core/setup_common.py#L264-L434
374374
# This port is in service of solving gh-23972
375375
# as well as https://github.com/mesonbuild/meson/issues/11068
376-
longdouble_format = meson.get_compiler('c').run(
376+
longdouble_format = meson.get_external_property('longdouble_format', 'UNKNOWN')
377+
if longdouble_format == 'UNKNOWN'
378+
longdouble_format = meson.get_compiler('c').run(
377379
'''
378380
#include <stdio.h>
379381
#include <string.h>
@@ -452,7 +454,8 @@ int main(void) {
452454
}
453455
}
454456
}
455-
''').stdout()
457+
''').stdout()
458+
endif
456459
if longdouble_format == 'UNKNOWN' or longdouble_format == 'UNDEFINED'
457460
error('Unknown long double format of size: ' + cc.sizeof('long double').to_string())
458461
endif

0 commit comments

Comments
 (0)
0