summaryrefslogtreecommitdiffstats
path: root/Lib/test/support
diff options
context:
space:
mode:
authorDonghee Na <donghee.na@python.org>2024-09-02 13:24:53 (GMT)
committerGitHub <noreply@github.com>2024-09-02 13:24:53 (GMT)
commitf95fc4de115ae03d7aa6dece678240df085cb4f6 (patch)
tree9bed9cc5d3fc72bac8e85e9c5a7e92bb1cad70f4 /Lib/test/support
parentf1a0d96f41db9dfa5d7f0b32e72f6f7301a86f91 (diff)
downloadcpython-f95fc4de115ae03d7aa6dece678240df085cb4f6.zip
cpython-f95fc4de115ae03d7aa6dece678240df085cb4f6.tar.gz
cpython-f95fc4de115ae03d7aa6dece678240df085cb4f6.tar.bz2
gh-101525: Skip test_gdb if the binary is relocated by BOLT. (gh-118572)
Diffstat (limited to 'Lib/test/support')
-rw-r--r--Lib/test/support/__init__.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index 3149fd7..dbf479d 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -866,6 +866,15 @@ def check_cflags_pgo():
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"):