3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-07 09:55:19 +00:00

merge dotnetcore into dotnet

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-05-30 13:01:48 -07:00
parent 6604aab1a2
commit 4d30639fd7
4 changed files with 13 additions and 17 deletions

View file

@ -86,7 +86,7 @@ def init_project_def():
static=build_static_lib(), static=build_static_lib(),
export_files=API_files, export_files=API_files,
staging_link='python') staging_link='python')
add_dot_net_core_dll('dotnetcore', ['api_dll'], 'api/dotnet', dll_name='Microsoft.Z3', default_key_file='src/api/dotnet/Microsoft.Z3.snk') add_dot_net_core_dll('dotnet', ['api_dll'], 'api/dotnet', dll_name='Microsoft.Z3', default_key_file='src/api/dotnet/Microsoft.Z3.snk')
add_java_dll('java', ['api_dll'], 'api/java', dll_name='libz3java', package_name="com.microsoft.z3", manifest_file='manifest') add_java_dll('java', ['api_dll'], 'api/java', dll_name='libz3java', package_name="com.microsoft.z3", manifest_file='manifest')
add_ml_lib('ml', ['api_dll'], 'api/ml', lib_name='libz3ml') add_ml_lib('ml', ['api_dll'], 'api/ml', lib_name='libz3ml')
add_hlib('cpp', 'api/c++', includes2install=['z3++.h']) add_hlib('cpp', 'api/c++', includes2install=['z3++.h'])

View file

@ -55,7 +55,6 @@ def display_help():
print(" -b <sudir>, --build=<subdir> subdirectory where x86 and x64 Z3 versions will be built (default: build-dist).") print(" -b <sudir>, --build=<subdir> subdirectory where x86 and x64 Z3 versions will be built (default: build-dist).")
print(" -f, --force force script to regenerate Makefiles.") print(" -f, --force force script to regenerate Makefiles.")
print(" --nodotnet do not include .NET bindings in the binary distribution files.") print(" --nodotnet do not include .NET bindings in the binary distribution files.")
print(" --dotnetcore build for dotnet core.")
print(" --dotnet-key=<file> sign the .NET assembly with the private key in <file>.") print(" --dotnet-key=<file> sign the .NET assembly with the private key in <file>.")
print(" --nojava do not include Java bindings in the binary distribution files.") print(" --nojava do not include Java bindings in the binary distribution files.")
print(" --nopython do not include Python bindings in the binary distribution files.") print(" --nopython do not include Python bindings in the binary distribution files.")
@ -71,7 +70,7 @@ def parse_options():
'silent', 'silent',
'force', 'force',
'nojava', 'nojava',
'nodotnetcore', 'nodotnet',
'dotnet-key=', 'dotnet-key=',
'githash', 'githash',
'nopython' 'nopython'
@ -87,7 +86,7 @@ def parse_options():
display_help() display_help()
elif opt in ('-f', '--force'): elif opt in ('-f', '--force'):
FORCE_MK = True FORCE_MK = True
elif opt == '--nodotnetcore': elif opt == '--nodotnet':
DOTNET_CORE_ENABLED = False DOTNET_CORE_ENABLED = False
elif opt == '--nopython': elif opt == '--nopython':
PYTHON_ENABLED = False PYTHON_ENABLED = False
@ -110,7 +109,7 @@ def mk_build_dir(path):
if not check_build_dir(path) or FORCE_MK: if not check_build_dir(path) or FORCE_MK:
opts = ["python", os.path.join('scripts', 'mk_make.py'), "-b", path, "--staticlib"] opts = ["python", os.path.join('scripts', 'mk_make.py'), "-b", path, "--staticlib"]
if DOTNET_CORE_ENABLED: if DOTNET_CORE_ENABLED:
opts.append('--dotnetcore') opts.append('--dotnet')
if not DOTNET_KEY_FILE is None: if not DOTNET_KEY_FILE is None:
opts.append('--dotnet-key=' + DOTNET_KEY_FILE) opts.append('--dotnet-key=' + DOTNET_KEY_FILE)
if JAVA_ENABLED: if JAVA_ENABLED:

View file

@ -62,7 +62,7 @@ PATTERN_COMPONENT='pattern'
UTIL_COMPONENT='util' UTIL_COMPONENT='util'
API_COMPONENT='api' API_COMPONENT='api'
DOTNET_COMPONENT='dotnet' DOTNET_COMPONENT='dotnet'
DOTNET_CORE_COMPONENT='dotnetcore' DOTNET_CORE_COMPONENT='dotnet'
JAVA_COMPONENT='java' JAVA_COMPONENT='java'
ML_COMPONENT='ml' ML_COMPONENT='ml'
CPP_COMPONENT='cpp' CPP_COMPONENT='cpp'
@ -651,8 +651,7 @@ def display_help(exit_code):
if IS_WINDOWS: if IS_WINDOWS:
print(" -v, --vsproj generate Visual Studio Project Files.") print(" -v, --vsproj generate Visual Studio Project Files.")
print(" --optimize generate optimized code during linking.") print(" --optimize generate optimized code during linking.")
print(" --dotnetcore generate .NET platform bindings.") print(" --dotnet generate .NET platform bindings.")
print(" --dotnet generate .NET bindings.")
print(" --dotnet-key=<file> sign the .NET assembly using the private key in <file>.") print(" --dotnet-key=<file> sign the .NET assembly using the private key in <file>.")
print(" --java generate Java bindings.") print(" --java generate Java bindings.")
print(" --ml generate OCaml bindings.") print(" --ml generate OCaml bindings.")
@ -697,7 +696,7 @@ def parse_options():
options, remainder = getopt.gnu_getopt(sys.argv[1:], options, remainder = getopt.gnu_getopt(sys.argv[1:],
'b:df:sxhmcvtnp:gj', 'b:df:sxhmcvtnp:gj',
['build=', 'debug', 'silent', 'x64', 'help', 'makefiles', 'showcpp', 'vsproj', 'guardcf', ['build=', 'debug', 'silent', 'x64', 'help', 'makefiles', 'showcpp', 'vsproj', 'guardcf',
'trace', 'dotnet', 'dotnetcore', 'dotnet-key=', 'esrp', 'staticlib', 'prefix=', 'gmp', 'java', 'parallel=', 'gprof', 'js', 'trace', 'dotnet', 'dotnet-key=', 'esrp', 'staticlib', 'prefix=', 'gmp', 'java', 'parallel=', 'gprof', 'js',
'githash=', 'git-describe', 'x86', 'ml', 'optimize', 'noomp', 'pypkgdir=', 'python', 'staticbin', 'log-sync']) 'githash=', 'git-describe', 'x86', 'ml', 'optimize', 'noomp', 'pypkgdir=', 'python', 'staticbin', 'log-sync'])
except: except:
print("ERROR: Invalid command line option") print("ERROR: Invalid command line option")
@ -729,7 +728,7 @@ def parse_options():
VS_PROJ = True VS_PROJ = True
elif opt in ('-t', '--trace'): elif opt in ('-t', '--trace'):
TRACE = True TRACE = True
elif opt in ('--dotnetcore',): elif opt in ('--dotnet',):
DOTNET_CORE_ENABLED = True DOTNET_CORE_ENABLED = True
elif opt in ('--dotnet-key'): elif opt in ('--dotnet-key'):
DOTNET_KEY_FILE = arg DOTNET_KEY_FILE = arg
@ -1626,7 +1625,7 @@ def set_key_file(self):
# build for dotnet core # build for dotnet core
class DotNetCoreDLLComponent(Component): class DotNetDLLComponent(Component):
def __init__(self, name, dll_name, path, deps, assembly_info_dir, default_key_file): def __init__(self, name, dll_name, path, deps, assembly_info_dir, default_key_file):
Component.__init__(self, name, path, deps) Component.__init__(self, name, path, deps)
if dll_name is None: if dll_name is None:
@ -2374,9 +2373,8 @@ def add_dll(name, deps=[], path=None, dll_name=None, export_files=[], reexports=
reg_component(name, c) reg_component(name, c)
return c return c
def add_dot_net_core_dll(name, deps=[], path=None, dll_name=None, assembly_info_dir=None, default_key_file=None): def add_dot_net_core_dll(name, deps=[], path=None, dll_name=None, assembly_info_dir=None, default_key_file=None):
c = DotNetCoreDLLComponent(name, dll_name, path, deps, assembly_info_dir, default_key_file) c = DotNetDLLComponent(name, dll_name, path, deps, assembly_info_dir, default_key_file)
reg_component(name, c) reg_component(name, c)
def add_java_dll(name, deps=[], path=None, dll_name=None, package_name=None, manifest_file=None): def add_java_dll(name, deps=[], path=None, dll_name=None, package_name=None, manifest_file=None):

View file

@ -63,7 +63,6 @@ def display_help():
print(" -b <sudir>, --build=<subdir> subdirectory where x86 and x64 Z3 versions will be built (default: build-dist).") print(" -b <sudir>, --build=<subdir> subdirectory where x86 and x64 Z3 versions will be built (default: build-dist).")
print(" -f, --force force script to regenerate Makefiles.") print(" -f, --force force script to regenerate Makefiles.")
print(" --nodotnet do not include .NET bindings in the binary distribution files.") print(" --nodotnet do not include .NET bindings in the binary distribution files.")
print(" --dotnetcore build for dotnet core.")
print(" --dotnet-key=<file> sign the .NET assembly with the private key in <file>.") print(" --dotnet-key=<file> sign the .NET assembly with the private key in <file>.")
print(" --esrp sign with esrp.") print(" --esrp sign with esrp.")
print(" --nojava do not include Java bindings in the binary distribution files.") print(" --nojava do not include Java bindings in the binary distribution files.")
@ -82,7 +81,7 @@ def parse_options():
'silent', 'silent',
'force', 'force',
'nojava', 'nojava',
'nodotnetcore', 'nodotnet',
'dotnet-key=', 'dotnet-key=',
'esrp', 'esrp',
'githash', 'githash',
@ -101,7 +100,7 @@ def parse_options():
display_help() display_help()
elif opt in ('-f', '--force'): elif opt in ('-f', '--force'):
FORCE_MK = True FORCE_MK = True
elif opt == '--nodotnetcore': elif opt == '--nodotnet':
DOTNET_CORE_ENABLED = False DOTNET_CORE_ENABLED = False
elif opt == '--nopython': elif opt == '--nopython':
PYTHON_ENABLED = False PYTHON_ENABLED = False
@ -131,7 +130,7 @@ def mk_build_dir(path, x64):
parallel = '--parallel=' + MAKEJOBS parallel = '--parallel=' + MAKEJOBS
opts = ["python", os.path.join('scripts', 'mk_make.py'), parallel, "-b", path] opts = ["python", os.path.join('scripts', 'mk_make.py'), parallel, "-b", path]
if DOTNET_CORE_ENABLED: if DOTNET_CORE_ENABLED:
opts.append('--dotnetcore') opts.append('--dotnet')
if not DOTNET_KEY_FILE is None: if not DOTNET_KEY_FILE is None:
opts.append('--dotnet-key=' + DOTNET_KEY_FILE) opts.append('--dotnet-key=' + DOTNET_KEY_FILE)
if JAVA_ENABLED: if JAVA_ENABLED: