mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 09:34:08 +00:00
remove reference to omp in legacy build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
721bb0d314
commit
1c89fd32b5
|
@ -110,7 +110,6 @@ GPROF=False
|
|||
GIT_HASH=False
|
||||
GIT_DESCRIBE=False
|
||||
SLOW_OPTIMIZE=False
|
||||
USE_OMP=True
|
||||
LOG_SYNC=False
|
||||
GUARD_CF=False
|
||||
ALWAYS_DYNAMIC_BASE=False
|
||||
|
@ -272,24 +271,6 @@ def test_gmp(cc):
|
|||
return exec_compiler_cmd([cc, CPPFLAGS, 'tstgmp.cpp', LDFLAGS, '-lgmp']) == 0
|
||||
|
||||
|
||||
def test_openmp(cc):
|
||||
if not USE_OMP:
|
||||
return False
|
||||
if is_verbose():
|
||||
print("Testing OpenMP...")
|
||||
t = TempFile('tstomp.cpp')
|
||||
t.add('#include<omp.h>\nint main() { return omp_in_parallel() ? 1 : 0; }\n')
|
||||
t.commit()
|
||||
if IS_WINDOWS:
|
||||
r = exec_compiler_cmd([cc, CPPFLAGS, 'tstomp.cpp', LDFLAGS, '/openmp']) == 0
|
||||
try:
|
||||
rmf('tstomp.obj')
|
||||
rmf('tstomp.exe')
|
||||
except:
|
||||
pass
|
||||
return r
|
||||
else:
|
||||
return exec_compiler_cmd([cc, CPPFLAGS, 'tstomp.cpp', LDFLAGS, '-fopenmp']) == 0
|
||||
|
||||
def test_fpmath(cc):
|
||||
global FPMATH_FLAGS
|
||||
|
@ -664,7 +645,6 @@ def display_help(exit_code):
|
|||
if not IS_WINDOWS:
|
||||
print(" -g, --gmp use GMP.")
|
||||
print(" --gprof enable gprof")
|
||||
print(" --noomp disable OpenMP and all features that require it.")
|
||||
print(" --log-sync synchronize access to API log files to enable multi-thread API logging.")
|
||||
print("")
|
||||
print("Some influential environment variables:")
|
||||
|
@ -692,14 +672,14 @@ def display_help(exit_code):
|
|||
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, JS_ENABLED, STATIC_LIB, STATIC_BIN, PREFIX, GMP, PYTHON_PACKAGE_DIR, GPROF, GIT_HASH, GIT_DESCRIBE, PYTHON_INSTALL_ENABLED, PYTHON_ENABLED, ESRP_SIGN
|
||||
global LINUX_X64, SLOW_OPTIMIZE, USE_OMP, LOG_SYNC
|
||||
global LINUX_X64, SLOW_OPTIMIZE, LOG_SYNC
|
||||
global GUARD_CF, ALWAYS_DYNAMIC_BASE
|
||||
try:
|
||||
options, remainder = getopt.gnu_getopt(sys.argv[1:],
|
||||
'b:df:sxhmcvtnp:gj',
|
||||
['build=', 'debug', 'silent', 'x64', 'help', 'makefiles', 'showcpp', 'vsproj', 'guardcf',
|
||||
'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', 'pypkgdir=', 'python', 'staticbin', 'log-sync'])
|
||||
except:
|
||||
print("ERROR: Invalid command line option")
|
||||
display_help(1)
|
||||
|
@ -763,8 +743,6 @@ def parse_options():
|
|||
ML_ENABLED = True
|
||||
elif opt == "--js":
|
||||
JS_ENABLED = True
|
||||
elif opt in ('', '--noomp'):
|
||||
USE_OMP = False
|
||||
elif opt in ('', '--log-sync'):
|
||||
LOG_SYNC = True
|
||||
elif opt in ('--python'):
|
||||
|
@ -2426,7 +2404,7 @@ def mk_config():
|
|||
if ONLY_MAKEFILES:
|
||||
return
|
||||
config = open(os.path.join(BUILD_DIR, 'config.mk'), 'w')
|
||||
global CXX, CC, GMP, CPPFLAGS, CXXFLAGS, LDFLAGS, EXAMP_DEBUG_FLAG, FPMATH_FLAGS, HAS_OMP, LOG_SYNC
|
||||
global CXX, CC, GMP, CPPFLAGS, CXXFLAGS, LDFLAGS, EXAMP_DEBUG_FLAG, FPMATH_FLAGS, LOG_SYNC
|
||||
if IS_WINDOWS:
|
||||
config.write(
|
||||
'CC=cl\n'
|
||||
|
@ -2446,12 +2424,7 @@ def mk_config():
|
|||
'OS_DEFINES=/D _WINDOWS\n')
|
||||
extra_opt = ''
|
||||
link_extra_opt = ''
|
||||
HAS_OMP = test_openmp('cl')
|
||||
if HAS_OMP:
|
||||
extra_opt = ' /openmp'
|
||||
else:
|
||||
extra_opt = ' /D_NO_OMP_'
|
||||
if HAS_OMP and LOG_SYNC:
|
||||
if LOG_SYNC:
|
||||
extra_opt = '%s /DZ3_LOG_SYNC' % extra_opt
|
||||
if GIT_HASH:
|
||||
extra_opt = ' %s /D Z3GITHASH=%s' % (extra_opt, GIT_HASH)
|
||||
|
@ -2515,7 +2488,6 @@ def mk_config():
|
|||
# End of Windows VS config.mk
|
||||
if is_verbose():
|
||||
print('64-bit: %s' % is64())
|
||||
print('OpenMP: %s' % HAS_OMP)
|
||||
if is_java_enabled():
|
||||
print('JNI Bindings: %s' % JNI_HOME)
|
||||
print('Java Compiler: %s' % JAVAC)
|
||||
|
@ -2551,14 +2523,7 @@ def mk_config():
|
|||
CXXFLAGS = '%s -fvisibility=hidden -c' % CXXFLAGS
|
||||
FPMATH = test_fpmath(CXX)
|
||||
CXXFLAGS = '%s %s' % (CXXFLAGS, FPMATH_FLAGS)
|
||||
HAS_OMP = test_openmp(CXX)
|
||||
if HAS_OMP:
|
||||
CXXFLAGS = '%s -fopenmp' % CXXFLAGS
|
||||
LDFLAGS = '%s -fopenmp' % LDFLAGS
|
||||
SLIBEXTRAFLAGS = '%s -fopenmp' % SLIBEXTRAFLAGS
|
||||
else:
|
||||
CXXFLAGS = '%s -D_NO_OMP_' % CXXFLAGS
|
||||
if HAS_OMP and LOG_SYNC:
|
||||
if LOG_SYNC:
|
||||
CXXFLAGS = '%s -DZ3_LOG_SYNC' % CXXFLAGS
|
||||
if DEBUG_MODE:
|
||||
CXXFLAGS = '%s -g -Wall' % CXXFLAGS
|
||||
|
@ -2661,7 +2626,6 @@ def mk_config():
|
|||
print('MinGW32 cross: %s' % (is_cygwin_mingw()))
|
||||
print('Archive Tool: %s' % AR)
|
||||
print('Arithmetic: %s' % ARITH)
|
||||
print('OpenMP: %s' % HAS_OMP)
|
||||
print('Prefix: %s' % PREFIX)
|
||||
print('64-bit: %s' % is64())
|
||||
print('FP math: %s' % FPMATH)
|
||||
|
@ -3166,10 +3130,6 @@ def mk_vs_proj_cl_compile(f, name, components, debug):
|
|||
f.write(' <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n')
|
||||
else:
|
||||
f.write(' <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n')
|
||||
if USE_OMP:
|
||||
f.write(' <OpenMPSupport>true</OpenMPSupport>\n')
|
||||
else:
|
||||
f.write(' <OpenMPSupport>false</OpenMPSupport>\n')
|
||||
f.write(' <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\n')
|
||||
f.write(' <AdditionalIncludeDirectories>')
|
||||
deps = find_all_deps(name, components)
|
||||
|
|
Loading…
Reference in a new issue