3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-11-24 14:41:28 +00:00

mk_util.py: fix --gprof option (#8040)

The addition of -fomit-frame-pointer was missing a space (which broke
the command line), but also this option should be added only if -pg is
*not* given, as they are incompatible. So, just remove this line to fix
the --gprof flag in configure.

Also, this option is implied by any level of `-O`, so there is no need
to pass it explicitly in most cases. It could be added to debug,
non-profile builds, but I'm not sure that's useful.
This commit is contained in:
Guido Martínez 2025-11-23 16:42:05 -08:00 committed by GitHub
parent 662e4293a5
commit 32e9440855
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2686,8 +2686,6 @@ def mk_config():
CPPFLAGS = '%s -DZ3DEBUG -D_DEBUG' % CPPFLAGS CPPFLAGS = '%s -DZ3DEBUG -D_DEBUG' % CPPFLAGS
else: else:
CXXFLAGS = '%s -O3' % CXXFLAGS CXXFLAGS = '%s -O3' % CXXFLAGS
if GPROF:
CXXFLAGS += '-fomit-frame-pointer'
CPPFLAGS = '%s -DNDEBUG -D_EXTERNAL_RELEASE' % CPPFLAGS CPPFLAGS = '%s -DNDEBUG -D_EXTERNAL_RELEASE' % CPPFLAGS
if is_CXX_clangpp(): if is_CXX_clangpp():
CXXFLAGS = '%s -Wno-unknown-pragmas -Wno-overloaded-virtual -Wno-unused-value' % CXXFLAGS CXXFLAGS = '%s -Wno-unknown-pragmas -Wno-overloaded-virtual -Wno-unused-value' % CXXFLAGS