if support.check_cflags_pgo():
# PGO (--enable-optimizations)
optimizations.append('PGO')
+
+ if support.check_bolt_optimized():
+ # BOLT (--enable-bolt)
+ optimizations.append('BOLT')
+
if optimizations:
build.append('+'.join(optimizations))
return any(option in cflags_nodist for option in pgo_options)
+def check_bolt_optimized():
+ # Always return false, if the platform is WASI,
+ # because BOLT optimization does not support WASM binary.
+ if is_wasi:
+ return False
+ config_args = sysconfig.get_config_var('CONFIG_ARGS') or ''
+ return '--enable-bolt' in config_args
+
+
Py_GIL_DISABLED = bool(sysconfig.get_config_var('Py_GIL_DISABLED'))
def requires_gil_enabled(msg="needs the GIL enabled"):
if support.check_cflags_pgo():
raise unittest.SkipTest("test_gdb is not reliable on PGO builds")
+if support.check_bolt_optimized():
+ raise unittest.SkipTest("test_gdb is not reliable on BOLT optimized builds")
+
def load_tests(*args):
return support.load_package_tests(os.path.dirname(__file__), *args)
--- /dev/null
+Skip ``test_gdb`` if the binary is relocated by BOLT.
+Patch by Donghee Na.