Skip to content

Commit caa3ed8

Browse files
committed
BLD: Try to use safer 32-bit FP for HiGHS
1 parent 79d4af0 commit caa3ed8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scipy/optimize/_highspy/meson.build

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ highs_opts = {
1212
'do_install': false,
1313
}
1414

15+
# Hacky workaround to not check cpu_family for 32 bit identifiers
16+
is_32bit = target_machine.cpu_family() in ['arc', 'arm', 'csky', 'ft32', 'mips', 'ppc', 'riscv32', 'rx', 'sparc', 'wasm32', 'x86']
17+
_float_store = cc.get_supported_arguments('-ffloat-store')
18+
_cpp_float_store = cpp.get_supported_arguments('-ffloat-store')
19+
1520
highs_proj = subproject('highs', default_options: highs_opts)
1621

1722
highs_args = highs_proj.get_variable('_args')
@@ -21,6 +26,10 @@ highs_incdirs = highs_proj.get_variable('_incdirs')
2126
highs_cpp_suppressions = highs_proj.get_variable('_highs_cpp_suppressions')
2227
highs_c_suppressions = highs_proj.get_variable('_highs_c_suppressions')
2328

29+
if is_32bit
30+
highs_args += _float_store + _cpp_float_store
31+
endif
32+
2433
highspy_cpp = highs_proj.get_variable('highspy_cpp')
2534
highs_conf_file = highs_proj.get_variable('highs_conf_file')
2635

0 commit comments

Comments
 (0)