mirror of
https://github.com/Z3Prover/z3
synced 2025-06-06 22:23:22 +00:00
ML API build fixes for cygwin
This commit is contained in:
parent
0254b1f7ff
commit
0930cfc53f
1 changed files with 15 additions and 3 deletions
|
@ -67,6 +67,7 @@ IS_LINUX=False
|
||||||
IS_OSX=False
|
IS_OSX=False
|
||||||
IS_FREEBSD=False
|
IS_FREEBSD=False
|
||||||
IS_OPENBSD=False
|
IS_OPENBSD=False
|
||||||
|
IS_CYGWIN=False
|
||||||
VERBOSE=True
|
VERBOSE=True
|
||||||
DEBUG_MODE=False
|
DEBUG_MODE=False
|
||||||
SHOW_CPPS = True
|
SHOW_CPPS = True
|
||||||
|
@ -134,6 +135,9 @@ def is_openbsd():
|
||||||
def is_osx():
|
def is_osx():
|
||||||
return IS_OSX
|
return IS_OSX
|
||||||
|
|
||||||
|
def is_cygwin():
|
||||||
|
return IS_CYGWIN
|
||||||
|
|
||||||
def norm_path(p):
|
def norm_path(p):
|
||||||
# We use '/' on mk_project for convenience
|
# We use '/' on mk_project for convenience
|
||||||
return os.path.join(*(p.split('/')))
|
return os.path.join(*(p.split('/')))
|
||||||
|
@ -583,6 +587,8 @@ elif os.name == 'posix':
|
||||||
IS_FREEBSD=True
|
IS_FREEBSD=True
|
||||||
elif os.uname()[0] == 'OpenBSD':
|
elif os.uname()[0] == 'OpenBSD':
|
||||||
IS_OPENBSD=True
|
IS_OPENBSD=True
|
||||||
|
elif os.uname()[0][:6] == 'CYGWIN':
|
||||||
|
IS_CYGWIN=True
|
||||||
|
|
||||||
def display_help(exit_code):
|
def display_help(exit_code):
|
||||||
print("mk_make.py: Z3 Makefile generator\n")
|
print("mk_make.py: Z3 Makefile generator\n")
|
||||||
|
@ -1676,6 +1682,8 @@ class JavaDLLComponent(Component):
|
||||||
t = t.replace('PLATFORM', 'freebsd')
|
t = t.replace('PLATFORM', 'freebsd')
|
||||||
elif IS_OPENBSD:
|
elif IS_OPENBSD:
|
||||||
t = t.replace('PLATFORM', 'openbsd')
|
t = t.replace('PLATFORM', 'openbsd')
|
||||||
|
elif IS_CYGWIN:
|
||||||
|
t = t.replace('PLATFORM', 'cygwin')
|
||||||
else:
|
else:
|
||||||
t = t.replace('PLATFORM', 'win32')
|
t = t.replace('PLATFORM', 'win32')
|
||||||
out.write(t)
|
out.write(t)
|
||||||
|
@ -1852,13 +1860,17 @@ class MLComponent(Component):
|
||||||
|
|
||||||
|
|
||||||
OCAMLMKLIB = 'ocamlmklib'
|
OCAMLMKLIB = 'ocamlmklib'
|
||||||
if DEBUG_MODE:
|
LIBZ3 = '-L. -lz3'
|
||||||
|
if is_cygwin():
|
||||||
|
# Some ocamlmklib's don't like -g; observed on cygwin, but may be others as well.
|
||||||
|
LIBZ3 = 'libz3.dll'
|
||||||
|
elif DEBUG_MODE:
|
||||||
OCAMLMKLIB += ' -g'
|
OCAMLMKLIB += ' -g'
|
||||||
z3mls = os.path.join(self.sub_dir, 'z3ml')
|
z3mls = os.path.join(self.sub_dir, 'z3ml')
|
||||||
out.write('%s.cma: %s %s %s\n' % (z3mls, cmos, stubso, z3dllso))
|
out.write('%s.cma: %s %s %s\n' % (z3mls, cmos, stubso, z3dllso))
|
||||||
out.write('\t%s -o %s -I %s %s %s -L. -lz3\n' % (OCAMLMKLIB, z3mls, self.sub_dir, stubso, cmos))
|
out.write('\t%s -o %s -I %s %s %s %s\n' % (OCAMLMKLIB, z3mls, self.sub_dir, stubso, cmos, LIBZ3))
|
||||||
out.write('%s.cmxa: %s %s %s\n' % (z3mls, cmxs, stubso, z3dllso))
|
out.write('%s.cmxa: %s %s %s\n' % (z3mls, cmxs, stubso, z3dllso))
|
||||||
out.write('\t%s -o %s -I %s %s %s -L. -lz3\n' % (OCAMLMKLIB, z3mls, self.sub_dir, stubso, cmxs))
|
out.write('\t%s -o %s -I %s %s %s %s\n' % (OCAMLMKLIB, z3mls, self.sub_dir, stubso, cmxs, LIBZ3))
|
||||||
out.write('%s.cmxs: %s.cmxa\n' % (z3mls, z3mls))
|
out.write('%s.cmxs: %s.cmxa\n' % (z3mls, z3mls))
|
||||||
out.write('\t%s -shared -o %s.cmxs -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
|
out.write('\t%s -shared -o %s.cmxs -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue