@@ -1955,9 +1955,8 @@ def mk_makefile(self, out):
1955
1955
OCAML_FLAGS += '-g'
1956
1956
1957
1957
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
1961
1960
else :
1962
1961
OCAMLCF = OCAMLC + ' ' + OCAML_FLAGS
1963
1962
OCAMLOPTF = OCAMLOPT + ' ' + OCAML_FLAGS
@@ -2285,7 +2284,7 @@ def mk_makefile(self, out):
2285
2284
out .write ('\t %s ' % OCAMLC )
2286
2285
if DEBUG_MODE :
2287
2286
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' )
2289
2288
for mlfile in get_ml_files (self .ex_dir ):
2290
2289
out .write (' %s/%s' % (self .to_ex_dir , mlfile ))
2291
2290
out .write ('\n ' )
@@ -2296,7 +2295,7 @@ def mk_makefile(self, out):
2296
2295
out .write ('\t %s ' % OCAMLOPT )
2297
2296
if DEBUG_MODE :
2298
2297
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' )
2300
2299
for mlfile in get_ml_files (self .ex_dir ):
2301
2300
out .write (' %s/%s' % (self .to_ex_dir , mlfile ))
2302
2301
out .write ('\n ' )
@@ -2619,11 +2618,11 @@ def mk_config():
2619
2618
config .write ('LINK=%s\n ' % CXX )
2620
2619
config .write ('LINK_FLAGS=\n ' )
2621
2620
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 )
2623
2622
config .write ('SO_EXT=%s\n ' % SO_EXT )
2624
2623
config .write ('SLINK=%s\n ' % CXX )
2625
2624
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 )
2627
2626
config .write ('SLINK_OUT_FLAG=-o \n ' )
2628
2627
config .write ('OS_DEFINES=%s\n ' % OS_DEFINES )
2629
2628
if is_verbose ():
0 commit comments