From 590b79dc5409b8064e752574d8583621f044b942 Mon Sep 17 00:00:00 2001 From: "Christoph M. Wintersteiger" Date: Fri, 6 Jun 2025 19:29:04 +0100 Subject: [PATCH] Fix #7623 (#7672) --- scripts/mk_util.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/mk_util.py b/scripts/mk_util.py index 5296e12d8..c1070e62a 100644 --- a/scripts/mk_util.py +++ b/scripts/mk_util.py @@ -2077,6 +2077,9 @@ class MLComponent(Component): # Some ocamlmklib's don't like -g; observed on cygwin, but may be others as well. OCAMLMKLIB += ' -g' + if IS_OSX: + OCAMLMKLIB += ' -ldopt -Wl,-headerpad_max_install_names' + z3mls = os.path.join(self.sub_dir, 'z3ml') LIBZ3ML = '' @@ -2694,6 +2697,8 @@ def mk_config(): CXXFLAGS = '%s -arch arm64' % CXXFLAGS LDFLAGS = '%s -arch arm64' % LDFLAGS SLIBEXTRAFLAGS = '%s -arch arm64' % SLIBEXTRAFLAGS + if IS_OSX and is_ml_enabled(): + SLIBFLAGS += ' -Wl,-headerpad_max_install_names' config.write('PREFIX=%s\n' % PREFIX) config.write('CC=%s\n' % CC)