mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 09:34:08 +00:00
trying reexport trick for OSX
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
fef6d622f5
commit
7ebc6fdd66
|
@ -63,7 +63,7 @@ add_lib('api', ['portfolio', 'user_plugin'])
|
|||
add_exe('shell', ['api', 'sat', 'extra_cmds'], exe_name='z3')
|
||||
add_exe('test', ['api', 'fuzzing'], exe_name='test-z3')
|
||||
API_files = ['z3_api.h']
|
||||
add_dll('api_dll', ['api', 'sat', 'extra_cmds'], 'api/dll', dll_name='z3', export_files=API_files)
|
||||
add_dll('api_dll', ['sat', 'extra_cmds'], 'api/dll', reexports=['api'], dll_name='z3', export_files=API_files)
|
||||
add_dot_net_dll('dotnet', ['api_dll'], 'bindings/dotnet/Microsoft.Z3', dll_name='Microsoft.Z3', assembly_info_dir='Properties')
|
||||
add_dot_net_dll('dotnetV3', ['api_dll'], 'bindings/dotnet/Microsoft.Z3V3', dll_name='Microsoft.Z3V3')
|
||||
set_python_dir('bindings/python')
|
||||
|
|
|
@ -335,12 +335,17 @@ class ExeComponent(Component):
|
|||
return True
|
||||
|
||||
class DLLComponent(Component):
|
||||
def __init__(self, name, dll_name, path, deps, export_files):
|
||||
def __init__(self, name, dll_name, path, deps, export_files, reexports):
|
||||
Component.__init__(self, name, path, deps)
|
||||
if dll_name == None:
|
||||
dll_name = name
|
||||
self.dll_name = dll_name
|
||||
self.export_files = export_files
|
||||
new_deps = find_all_deps(name, reexports)
|
||||
for new_dep in new_deps:
|
||||
if not new_dep in reexports:
|
||||
self.deps.append(new_dep)
|
||||
self.reexports = reexports
|
||||
|
||||
def mk_makefile(self, out):
|
||||
global _Name2Component
|
||||
|
@ -356,6 +361,12 @@ class DLLComponent(Component):
|
|||
for cppfile in get_cpp_files(self.src_dir):
|
||||
objfile = '%s/%s$(OBJ_EXT)' % (self.build_dir, os.path.splitext(cppfile)[0])
|
||||
objs.append(objfile)
|
||||
# Explicitly include obj files of reexport. This fixes problems with exported symbols on Linux and OSX.
|
||||
for reexport in self.reexports:
|
||||
reexport = get_component(reexport)
|
||||
for cppfile in get_cpp_files(reexport.src_dir):
|
||||
objfile = '%s/%s$(OBJ_EXT)' % (reexport.build_dir, os.path.splitext(cppfile)[0])
|
||||
objs.append(objfile)
|
||||
for obj in objs:
|
||||
out.write(' ')
|
||||
out.write(obj)
|
||||
|
@ -427,8 +438,8 @@ def add_exe(name, deps=[], path=None, exe_name=None):
|
|||
c = ExeComponent(name, exe_name, path, deps)
|
||||
reg_component(name, c)
|
||||
|
||||
def add_dll(name, deps=[], path=None, dll_name=None, export_files=[]):
|
||||
c = DLLComponent(name, dll_name, path, deps, export_files)
|
||||
def add_dll(name, deps=[], path=None, dll_name=None, export_files=[], reexports=[]):
|
||||
c = DLLComponent(name, dll_name, path, deps, export_files, reexports)
|
||||
reg_component(name, c)
|
||||
|
||||
def add_dot_net_dll(name, deps=[], path=None, dll_name=None, assembly_info_dir=None):
|
||||
|
|
Loading…
Reference in a new issue