# HG changeset patch # User Chris Cannam # Date 1712828010 -3600 # Thu Apr 11 10:33:30 2024 +0100 # Node ID 0e6e674ae9dbab61deff381d7991dacac93b44ff # Parent 7af5ca3dd9df43c3b0f6053407c501e7b8551f8c Further FFI diff --git a/all-ffi.mlb b/all-ffi.mlb --- a/all-ffi.mlb +++ b/all-ffi.mlb @@ -131,6 +131,7 @@ bsq-signalbits/summarise.sml bsq-signalbits/distance.sig bsq-signalbits/distance.sml +bsq-signalbits/distance-ffi.sml bsq-signalbits/scale-intervals.sig bsq-signalbits/scale-intervals.sml bsq-signalbits/greek.sml diff --git a/meson.build b/meson.build --- a/meson.build +++ b/meson.build @@ -336,6 +336,7 @@ bq_flags = [ '-DNO_EXCEPTIONS', + '-O3', ] bq_lib = static_library( @@ -405,6 +406,12 @@ ], ) + mlton_cc_opts = [] + foreach opt : bq_flags + mlton_cc_opts += '-cc-opt-quote' + mlton_cc_opts += opt + endforeach + mlton_link_opts = [] foreach opt : platform_feature_libs mlton_link_opts += '-link-opt-quote' @@ -468,6 +475,7 @@ '-default-ann', 'allowFFI true', '-default-ann', 'allowPrim true', '-disable-pass', 'deepFlatten', + mlton_cc_opts, '-link-opt', '-L.', '-link-opt', '-lbq', mlton_link_opts, @@ -478,6 +486,7 @@ meson.current_source_dir() / 'bsq-matrix/ffi/copyvec.c', meson.current_source_dir() / 'bsq-rrloop/ffi/rr-support.c', meson.current_source_dir() / 'bsq-signalbits/ffi/window-post.c', + meson.current_source_dir() / 'bsq-signalbits/ffi/distance.c', ], depends: [ bq_lib, @@ -503,6 +512,7 @@ '-default-ann', 'allowFFI true', '-default-ann', 'allowPrim true', '-disable-pass', 'deepFlatten', + mlton_cc_opts, '-link-opt', '-L.', '-link-opt', '-lbq', mlton_link_opts, @@ -513,6 +523,7 @@ meson.current_source_dir() / 'bsq-matrix/ffi/copyvec.c', meson.current_source_dir() / 'bsq-rrloop/ffi/rr-support.c', meson.current_source_dir() / 'bsq-signalbits/ffi/window-post.c', + meson.current_source_dir() / 'bsq-signalbits/ffi/distance.c', ], depends: [ bq_lib,