Skip to content

Commit 1c39b01

Browse files
HaoZekergommers
andcommitted
MAINT: Apply review comments for HiGHS interface
Co-authored-by: rgommers <[email protected]>
1 parent caa3ed8 commit 1c39b01

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

scipy/optimize/_highspy/meson.build

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ 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')
15+
is_32bit = false
16+
if cc.sizeof('void*') <= 4
17+
is_32bit = true
18+
endif
1919

2020
highs_proj = subproject('highs', default_options: highs_opts)
2121

@@ -27,6 +27,8 @@ highs_cpp_suppressions = highs_proj.get_variable('_highs_cpp_suppressions')
2727
highs_c_suppressions = highs_proj.get_variable('_highs_c_suppressions')
2828

2929
if is_32bit
30+
_float_store = cc.get_supported_arguments('-ffloat-store')
31+
_cpp_float_store = cpp.get_supported_arguments('-ffloat-store')
3032
highs_args += _float_store + _cpp_float_store
3133
endif
3234

@@ -54,7 +56,7 @@ _highs_dep = declare_dependency(
5456
include_directories: highs_incdirs,
5557
)
5658

57-
scipy_highspy_dep = [py3_dep, pybind11_dep, _highs_dep, thread_dep, atomic_dep]
59+
scipy_highspy_dep = [pybind11_dep, _highs_dep, thread_dep, atomic_dep]
5860

5961
py3.install_sources(
6062
['__init__.py', '_highs_wrapper.py'],
@@ -66,7 +68,6 @@ py3.extension_module(
6668
sources: [highspy_cpp, highs_conf_file],
6769
dependencies: scipy_highspy_dep,
6870
link_args: version_link_args,
69-
gnu_symbol_visibility: 'hidden', # default
7071
install: true,
7172
subdir: 'scipy/optimize/_highspy',
7273
)
@@ -76,7 +77,6 @@ py3.extension_module(
7677
sources: [highs_conf_file, 'highs_options.cpp'],
7778
dependencies: scipy_highspy_dep,
7879
link_args: version_link_args,
79-
gnu_symbol_visibility: 'hidden', # default
8080
install: true,
8181
subdir: 'scipy/optimize/_highspy',
8282
)

0 commit comments

Comments
 (0)