mirror of
https://github.com/Z3Prover/z3
synced 2025-08-08 04:01:22 +00:00
Merge branch 'master' of https://github.com/Z3Prover/z3 into jfleisher/devIntellitest
This commit is contained in:
commit
e496afd908
58 changed files with 667 additions and 409 deletions
|
@ -56,6 +56,7 @@ def display_help():
|
|||
print(" -f, --force force script to regenerate Makefiles.")
|
||||
print(" --nodotnet do not include .NET bindings in the binary distribution files.")
|
||||
print(" --dotnet-key=<file> sign the .NET assembly with the private key in <file>.")
|
||||
print(" --arch=<arch> set architecture (to arm64) to force arm64 build")
|
||||
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(" --githash include git hash in the Zip file.")
|
||||
|
@ -72,6 +73,7 @@ def parse_options():
|
|||
'nojava',
|
||||
'nodotnet',
|
||||
'dotnet-key=',
|
||||
'arch=',
|
||||
'githash',
|
||||
'nopython'
|
||||
])
|
||||
|
@ -96,6 +98,11 @@ def parse_options():
|
|||
JAVA_ENABLED = False
|
||||
elif opt == '--githash':
|
||||
GIT_HASH = True
|
||||
elif opt == '--arch':
|
||||
if arg == "arm64":
|
||||
mk_util.IS_ARCH_ARM64 = True
|
||||
else:
|
||||
raise MKException("Invalid architecture directive '%s'. Legal directives: arm64" % arg)
|
||||
else:
|
||||
raise MKException("Invalid command line option '%s'" % opt)
|
||||
set_build_dir(path)
|
||||
|
@ -119,6 +126,8 @@ def mk_build_dir(path):
|
|||
opts.append('--git-describe')
|
||||
if PYTHON_ENABLED:
|
||||
opts.append('--python')
|
||||
if mk_util.IS_ARCH_ARM64:
|
||||
opts.append('--arm64=true')
|
||||
if subprocess.call(opts) != 0:
|
||||
raise MKException("Failed to generate build directory at '%s'" % path)
|
||||
|
||||
|
@ -172,7 +181,9 @@ def get_os_name():
|
|||
|
||||
def get_z3_name():
|
||||
major, minor, build, revision = get_version()
|
||||
if sys.maxsize >= 2**32:
|
||||
if mk_util.IS_ARCH_ARM64:
|
||||
platform = "arm64"
|
||||
elif sys.maxsize >= 2**32:
|
||||
platform = "x64"
|
||||
else:
|
||||
platform = "x86"
|
||||
|
|
|
@ -69,6 +69,7 @@ IS_WINDOWS=False
|
|||
IS_LINUX=False
|
||||
IS_HURD=False
|
||||
IS_OSX=False
|
||||
IS_ARCH_ARM64=False
|
||||
IS_FREEBSD=False
|
||||
IS_NETBSD=False
|
||||
IS_OPENBSD=False
|
||||
|
@ -278,10 +279,13 @@ def test_gmp(cc):
|
|||
|
||||
|
||||
def test_fpmath(cc):
|
||||
global FPMATH_FLAGS
|
||||
global FPMATH_FLAGS, IS_ARCH_ARM64, IS_OSX
|
||||
if FPMATH_ENABLED == "False":
|
||||
FPMATH_FLAGS=""
|
||||
return "Disabled"
|
||||
if IS_ARCH_ARM64 and IS_OSX:
|
||||
FPMATH_FLAGS = ""
|
||||
return "Disabled-ARM64"
|
||||
if is_verbose():
|
||||
print("Testing floating point support...")
|
||||
t = TempFile('tstsse.cpp')
|
||||
|
@ -620,8 +624,12 @@ elif os.name == 'posix':
|
|||
LINUX_X64=True
|
||||
else:
|
||||
LINUX_X64=False
|
||||
|
||||
|
||||
|
||||
if os.name == 'posix' and os.uname()[4] == 'arm64':
|
||||
IS_ARCH_ARM64 = True
|
||||
|
||||
|
||||
def display_help(exit_code):
|
||||
print("mk_make.py: Z3 Makefile generator\n")
|
||||
print("This script generates the Makefile for the Z3 theorem prover.")
|
||||
|
@ -644,6 +652,7 @@ def display_help(exit_code):
|
|||
print(" -x, --x64 create 64 binary when using Visual Studio.")
|
||||
else:
|
||||
print(" --x86 force 32-bit x86 build on x64 systems.")
|
||||
print(" --arm64=<bool> forcearm64 bit build on/off (supported for Darwin).")
|
||||
print(" -m, --makefiles generate only makefiles.")
|
||||
if IS_WINDOWS:
|
||||
print(" -v, --vsproj generate Visual Studio Project Files.")
|
||||
|
@ -686,11 +695,11 @@ def parse_options():
|
|||
global VERBOSE, DEBUG_MODE, IS_WINDOWS, VS_X64, ONLY_MAKEFILES, SHOW_CPPS, VS_PROJ, TRACE, VS_PAR, VS_PAR_NUM
|
||||
global DOTNET_CORE_ENABLED, DOTNET_KEY_FILE, JAVA_ENABLED, ML_ENABLED, STATIC_LIB, STATIC_BIN, PREFIX, GMP, PYTHON_PACKAGE_DIR, GPROF, GIT_HASH, GIT_DESCRIBE, PYTHON_INSTALL_ENABLED, PYTHON_ENABLED
|
||||
global LINUX_X64, SLOW_OPTIMIZE, LOG_SYNC, SINGLE_THREADED
|
||||
global GUARD_CF, ALWAYS_DYNAMIC_BASE
|
||||
global GUARD_CF, ALWAYS_DYNAMIC_BASE, IS_ARCH_ARM64
|
||||
try:
|
||||
options, remainder = getopt.gnu_getopt(sys.argv[1:],
|
||||
'b:df:sxhmcvtnp:gj',
|
||||
['build=', 'debug', 'silent', 'x64', 'help', 'makefiles', 'showcpp', 'vsproj', 'guardcf',
|
||||
'b:df:sxa:hmcvtnp:gj',
|
||||
['build=', 'debug', 'silent', 'x64', 'arm64=', 'help', 'makefiles', 'showcpp', 'vsproj', 'guardcf',
|
||||
'trace', 'dotnet', 'dotnet-key=', 'staticlib', 'prefix=', 'gmp', 'java', 'parallel=', 'gprof', 'js',
|
||||
'githash=', 'git-describe', 'x86', 'ml', 'optimize', 'pypkgdir=', 'python', 'staticbin', 'log-sync', 'single-threaded'])
|
||||
except:
|
||||
|
@ -713,6 +722,8 @@ def parse_options():
|
|||
VS_X64 = True
|
||||
elif opt in ('--x86'):
|
||||
LINUX_X64=False
|
||||
elif opt in ('--arm64'):
|
||||
IS_ARCH_ARM64 = arg in ('true','on','True','TRUE')
|
||||
elif opt in ('-h', '--help'):
|
||||
display_help(0)
|
||||
elif opt in ('-m', '--makefiles'):
|
||||
|
@ -2431,7 +2442,7 @@ def mk_config():
|
|||
if ONLY_MAKEFILES:
|
||||
return
|
||||
config = open(os.path.join(BUILD_DIR, 'config.mk'), 'w')
|
||||
global CXX, CC, GMP, GUARD_CF, STATIC_BIN, GIT_HASH, CPPFLAGS, CXXFLAGS, LDFLAGS, EXAMP_DEBUG_FLAG, FPMATH_FLAGS, LOG_SYNC, SINGLE_THREADED
|
||||
global CXX, CC, GMP, GUARD_CF, STATIC_BIN, GIT_HASH, CPPFLAGS, CXXFLAGS, LDFLAGS, EXAMP_DEBUG_FLAG, FPMATH_FLAGS, LOG_SYNC, SINGLE_THREADED, IS_ARCH_ARM64
|
||||
if IS_WINDOWS:
|
||||
CXXFLAGS = '/nologo /Zi /D WIN32 /D _WINDOWS /EHsc /GS /Gd /std:c++17'
|
||||
config.write(
|
||||
|
@ -2636,6 +2647,11 @@ def mk_config():
|
|||
LDFLAGS = '%s -static-libgcc -static-libstdc++' % LDFLAGS
|
||||
if sysname == 'Linux' and machine.startswith('armv7') or machine.startswith('armv8'):
|
||||
CXXFLAGS = '%s -fpic' % CXXFLAGS
|
||||
if IS_OSX and IS_ARCH_ARM64:
|
||||
print("Setting arm64")
|
||||
CXXFLAGS = '%s -arch arm64' % CXXFLAGS
|
||||
LDFLAGS = '%s -arch arm64' % LDFLAGS
|
||||
SLIBEXTRAFLAGS = '%s -arch arm64' % SLIBEXTRAFLAGS
|
||||
|
||||
config.write('PREFIX=%s\n' % PREFIX)
|
||||
config.write('CC=%s\n' % CC)
|
||||
|
|
|
@ -4,7 +4,6 @@ variables:
|
|||
Minor: '8'
|
||||
Patch: '16'
|
||||
NightlyVersion: $(Major).$(Minor).$(Patch).$(Build.BuildId)-$(Build.DefinitionName)
|
||||
MacFlags: 'CXXFLAGS="-arch x86_64" LINK_EXTRA_FLAGS="-arch x86_64" SLINK_EXTRA_FLAGS="-arch x86_64"'
|
||||
|
||||
stages:
|
||||
- stage: Build
|
||||
|
@ -15,7 +14,7 @@ stages:
|
|||
pool:
|
||||
vmImage: "macOS-latest"
|
||||
steps:
|
||||
- script: $(MacFlags) python scripts/mk_unix_dist.py --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk
|
||||
- script: python scripts/mk_unix_dist.py --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk
|
||||
- script: git clone https://github.com/z3prover/z3test z3test
|
||||
- script: python z3test/scripts/test_benchmarks.py build-dist/z3 z3test/regressions/smt2
|
||||
- script: cp dist/*.zip $(Build.ArtifactStagingDirectory)/.
|
||||
|
@ -25,6 +24,20 @@ stages:
|
|||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
|
||||
- job: MacArm64
|
||||
displayName: "Mac ARM64 Build"
|
||||
pool:
|
||||
vmImage: "macOS-latest"
|
||||
steps:
|
||||
- script: python scripts/mk_unix_dist.py --dotnet-key=$(Build.SourcesDirectory)/resources/z3.snk --arch=arm64
|
||||
- script: git clone https://github.com/z3prover/z3test z3test
|
||||
- script: cp dist/*.zip $(Build.ArtifactStagingDirectory)/.
|
||||
- task: PublishPipelineArtifact@1
|
||||
inputs:
|
||||
artifactName: 'MacArm64'
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
|
||||
- job: Ubuntu
|
||||
displayName: "Ubuntu build"
|
||||
pool:
|
||||
|
@ -166,6 +179,11 @@ stages:
|
|||
inputs:
|
||||
artifact: 'Mac'
|
||||
path: $(Agent.TempDirectory)\package
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download macOS Arm64 Build'
|
||||
inputs:
|
||||
artifact: 'MacArm64'
|
||||
path: $(Agent.TempDirectory)\package
|
||||
- task: NuGetToolInstaller@0
|
||||
inputs:
|
||||
versionSpec: 5.x
|
||||
|
@ -381,7 +399,12 @@ stages:
|
|||
inputs:
|
||||
artifactName: 'Mac'
|
||||
targetPath: $(Agent.TempDirectory)
|
||||
- script: cd $(Agent.TempDirectory); mkdir osx-bin; cd osx-bin; unzip ../*osx*.zip
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
artifactName: 'MacArm64'
|
||||
targetPath: $(Agent.TempDirectory)
|
||||
- script: cd $(Agent.TempDirectory); mkdir osx-x64-bin; cd osx-x64-bin; unzip ../*x64-osx*.zip
|
||||
- script: cd $(Agent.TempDirectory); mkdir osx-arm64-bin; cd osx-arm64-bin; unzip ../*arm64-osx*.zip
|
||||
- script: cd $(Agent.TempDirectory); mkdir linux-bin; cd linux-bin; unzip ../*glibc*.zip
|
||||
- script: cd $(Agent.TempDirectory); mkdir win32-bin; cd win32-bin; unzip ../*x86-win*.zip
|
||||
- script: cd $(Agent.TempDirectory); mkdir win64-bin; cd win64-bin; unzip ../*x64-win*.zip
|
||||
|
@ -391,7 +414,8 @@ stages:
|
|||
- script: cd src/api/python; echo $(Agent.TempDirectory)/linux-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel
|
||||
- script: cd src/api/python; echo $(Agent.TempDirectory)/win32-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel
|
||||
- script: cd src/api/python; echo $(Agent.TempDirectory)/win64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel
|
||||
- script: cd src/api/python; echo $(Agent.TempDirectory)/osx-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel
|
||||
- script: cd src/api/python; echo $(Agent.TempDirectory)/osx-x64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel
|
||||
- script: cd src/api/python; echo $(Agent.TempDirectory)/osx-arm64-bin/* | xargs printf 'PACKAGE_FROM_RELEASE=%s\n' | xargs -I '{}' env '{}' python3 setup.py bdist_wheel
|
||||
- task: PublishPipelineArtifact@0
|
||||
inputs:
|
||||
artifactName: 'Python packages'
|
||||
|
@ -421,6 +445,11 @@ stages:
|
|||
inputs:
|
||||
artifactName: 'Mac'
|
||||
targetPath: tmp
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: "Download MacArm64"
|
||||
inputs:
|
||||
artifactName: 'MacArm64'
|
||||
targetPath: tmp
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: "Download Ubuntu"
|
||||
inputs:
|
||||
|
|
|
@ -1820,8 +1820,8 @@ _error_handler_type = ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_uint)
|
|||
_lib.Z3_set_error_handler.restype = None
|
||||
_lib.Z3_set_error_handler.argtypes = [ContextObj, _error_handler_type]
|
||||
|
||||
push_eh_type = ctypes.CFUNCTYPE(None, ctypes.c_void_p)
|
||||
pop_eh_type = ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_uint)
|
||||
push_eh_type = ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_void_p)
|
||||
pop_eh_type = ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_uint)
|
||||
fresh_eh_type = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p)
|
||||
|
||||
fixed_eh_type = ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue