Skip to content

Commit bbd9435

Browse files
committed
global: change debug field to optimizations
This makes more sense.
1 parent c9631ac commit bbd9435

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

cpython-unix/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ def build_cpython(
724724
python_info = {
725725
"version": "5",
726726
"target_triple": target_triple,
727-
"debug": optimizations == "debug",
727+
"optimizations": optimizations,
728728
"python_tag": entry["python_tag"],
729729
"python_version": entry["version"],
730730
"python_stdlib_test_packages": sorted(STDLIB_TEST_PACKAGES),

cpython-windows/build.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1886,11 +1886,16 @@ def build_cpython(python_entry_name: str, arch: str, sh_exe, profile):
18861886
# We currently always link vcruntime140.dll.
18871887
crt_features = ["vcruntime:140"]
18881888

1889+
if "pgo" in profile:
1890+
optimizations = "pgo"
1891+
else:
1892+
optimizations = "noopt"
1893+
18891894
# Create PYTHON.json file describing this distribution.
18901895
python_info = {
18911896
"version": "5",
18921897
"target_triple": target_triple,
1893-
"debug": False,
1898+
"optimizations": optimizations,
18941899
"python_tag": entry["python_tag"],
18951900
"python_version": python_version,
18961901
"python_symbol_visibility": python_symbol_visibility,

docs/distributions.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ target_triple
4545

4646
(Version 5 or above only.)
4747

48-
debug
49-
Boolean indicating if this is a debug build.
48+
optimizations
49+
String indicating what optimization profile has been applied to the
50+
build.
5051

51-
Debug builds have no optimizations.
52+
Known values include ``debug``, ``noopt``, ``pgo``, ``lto``, and
53+
``pgo+lto``.
5254

5355
(Version 5 or above only.)
5456

0 commit comments

Comments
 (0)