|
| 1 | +--- z3-z3-4.12.2/scripts/mk_util.py.orig 2023-05-12 13:59:04.000000000 -0600 |
| 2 | ++++ z3-z3-4.12.2/scripts/mk_util.py 2023-07-06 11:53:06.045350565 -0600 |
| 3 | +@@ -34,7 +34,7 @@ EXAMP_DEBUG_FLAG='' |
| 4 | + LDFLAGS=getenv("LDFLAGS", "") |
| 5 | + JNI_HOME=getenv("JNI_HOME", None) |
| 6 | + OCAMLC=getenv("OCAMLC", "ocamlc") |
| 7 | +-OCAMLOPT=getenv("OCAMLOPT", "ocamlopt") |
| 8 | ++OCAMLOPT=getenv("OCAMLOPT", None) |
| 9 | + OCAML_LIB=getenv("OCAML_LIB", None) |
| 10 | + OCAMLFIND=getenv("OCAMLFIND", "ocamlfind") |
| 11 | + DOTNET="dotnet" |
| 12 | +@@ -460,13 +460,9 @@ def check_ml(): |
| 13 | + raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler') |
| 14 | + if is_verbose(): |
| 15 | + print ('Testing %s...' % OCAMLOPT) |
| 16 | +- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml']) |
| 17 | +- if r != 0: |
| 18 | +- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.') |
| 19 | + try: |
| 20 | + rmf('hello.cmi') |
| 21 | + rmf('hello.cmo') |
| 22 | +- rmf('hello.cmx') |
| 23 | + rmf('a.out') |
| 24 | + rmf('hello.o') |
| 25 | + except: |
| 26 | +@@ -2069,7 +2065,7 @@ class MLComponent(Component): |
| 27 | + out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls)) |
| 28 | + |
| 29 | + out.write('\n') |
| 30 | +- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls)) |
| 31 | ++ out.write('ml: %s.cma\n' % z3mls) |
| 32 | + if IS_OSX: |
| 33 | + out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path)) |
| 34 | + out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path)) |
| 35 | +@@ -2091,8 +2087,6 @@ class MLComponent(Component): |
| 36 | + out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ') |
| 37 | + out.write(os.path.join(self.sub_dir, 'META ')) |
| 38 | + out.write(os.path.join(self.sub_dir, 'z3ml.cma ')) |
| 39 | +- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa ')) |
| 40 | +- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs ')) |
| 41 | + |
| 42 | + def mk_install(self, out): |
| 43 | + if is_ml_enabled() and self._install_bindings(): |
| 44 | +@@ -2119,12 +2113,9 @@ class MLComponent(Component): |
| 45 | + else: |
| 46 | + out.write(' ' + os.path.join(self.sub_dir, m) + '.mli') |
| 47 | + out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi') |
| 48 | +- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx') |
| 49 | + out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)')))) |
| 50 | + out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)')))) |
| 51 | + out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma')))) |
| 52 | +- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa')))) |
| 53 | +- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs')))) |
| 54 | + out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml')))) |
| 55 | + if is_windows() or is_cygwin_mingw() or is_msys2(): |
| 56 | + out.write('.dll') |
0 commit comments