python3 -m sysconfig showing the wrong optimization flag
Bug #2100624 reported by
Marcos Alano
This bug affects 1 person
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| python3.12 (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Bug Description
If I execute `python3 -m sysconfig`, I can see all the options related to how Python was compiled.
The problem is: Python now is compiled with '-O3' flag by default on upstream and also downstream, but for some reason the previously mentioned command shows '-O2'. It's because a line in d/rules that does the replacement, but I don't think we still need it since '-O3' is the default behavior. Keeping '-O2' instead of the real '-O2' is masking the real value, making the sysconfig module less trustworthy.
To post a comment you must log in.

> I can see all the options related to how Python was compiled.
this is not the purpose of this module. It's used to build third party extensions. The build systems for the third party extensions pick up the flags from the environment.