Skip to content

Commit 6b117c0

Browse files
move to zarith #2471
Signed-off-by: NikolajBjorner <[email protected]>
1 parent 0b06a9b commit 6b117c0

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

scripts/mk_util.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1955,9 +1955,8 @@ def mk_makefile(self, out):
19551955
OCAML_FLAGS += '-g'
19561956

19571957
if OCAMLFIND:
1958-
# Load Big_int, which is no longer part of the standard library, via the num package: https://github.com/ocaml/num
1959-
OCAMLCF = OCAMLFIND + ' ' + 'ocamlc -package num' + ' ' + OCAML_FLAGS
1960-
OCAMLOPTF = OCAMLFIND + ' ' + 'ocamlopt -package num' + ' ' + OCAML_FLAGS
1958+
OCAMLCF = OCAMLC + ' ' + 'ocamlc -package zarith' + ' ' + OCAML_FLAGS
1959+
OCAMLOPTF = OCAMLOPT + ' ' + 'ocamlopt -package zarith' + ' ' + OCAML_FLAGS
19611960
else:
19621961
OCAMLCF = OCAMLC + ' ' + OCAML_FLAGS
19631962
OCAMLOPTF = OCAMLOPT + ' ' + OCAML_FLAGS
@@ -2285,7 +2284,7 @@ def mk_makefile(self, out):
22852284
out.write('\t%s ' % OCAMLC)
22862285
if DEBUG_MODE:
22872286
out.write('-g ')
2288-
out.write('-custom -o ml_example.byte -I api/ml -cclib "-L. -lz3" nums.cma z3ml.cma')
2287+
out.write('-custom -o ml_example.byte -I -zarith -I api/ml -cclib "-L. -lz3" zarith.cma z3ml.cma')
22892288
for mlfile in get_ml_files(self.ex_dir):
22902289
out.write(' %s/%s' % (self.to_ex_dir, mlfile))
22912290
out.write('\n')
@@ -2296,7 +2295,7 @@ def mk_makefile(self, out):
22962295
out.write('\t%s ' % OCAMLOPT)
22972296
if DEBUG_MODE:
22982297
out.write('-g ')
2299-
out.write('-o ml_example$(EXE_EXT) -I api/ml -cclib "-L. -lz3" nums.cmxa z3ml.cmxa')
2298+
out.write('-o ml_example$(EXE_EXT) -I -zarith -I api/ml -cclib "-L. -lz3" zarith.cmxa z3ml.cmxa')
23002299
for mlfile in get_ml_files(self.ex_dir):
23012300
out.write(' %s/%s' % (self.to_ex_dir, mlfile))
23022301
out.write('\n')
@@ -2619,11 +2618,11 @@ def mk_config():
26192618
config.write('LINK=%s\n' % CXX)
26202619
config.write('LINK_FLAGS=\n')
26212620
config.write('LINK_OUT_FLAG=-o \n')
2622-
config.write('LINK_EXTRA_FLAGS=-lpthread %s\n' % LDFLAGS)
2621+
config.write('LINK_EXTRA_FLAGS=-Wl,--whole-archive -lpthread -Wl,--no-whole-archive %s\n' % LDFLAGS)
26232622
config.write('SO_EXT=%s\n' % SO_EXT)
26242623
config.write('SLINK=%s\n' % CXX)
26252624
config.write('SLINK_FLAGS=%s\n' % SLIBFLAGS)
2626-
config.write('SLINK_EXTRA_FLAGS=-lpthread %s\n' % SLIBEXTRAFLAGS)
2625+
config.write('SLINK_EXTRA_FLAGS=-Wl,--whole-archive -lpthread -Wl,--no-whole-archive %s\n' % SLIBEXTRAFLAGS)
26272626
config.write('SLINK_OUT_FLAG=-o \n')
26282627
config.write('OS_DEFINES=%s\n' % OS_DEFINES)
26292628
if is_verbose():

src/api/ml/META.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# META file for the "z3" package:
22
version = "@VERSION@"
33
description = "Z3 Theorem Prover (OCaml API)"
4-
requires = "num threads"
4+
requires = "zarith threads"
55
archive(byte) = "z3ml.cma"
66
archive(native) = "z3ml.cmxa"
77
archive(byte,plugin) = "z3ml.cma"

0 commit comments

Comments
 (0)