You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gh-xxxx: expose _PYTHON_HOST_PLATFORM as a settable variable
The generated sysconfig data during builds encodes a PEP-425
platform tag. During native (target=host) builds, the bootstrapped
compiler runs Python code in sysconfig to derive an appropriate value.
For cross compiles, we fall back to logic in configure (that code
lives around the changed lines) to derive an appropriate platform
tag, which is exported as an environment variable during builds.
And there is a "backdoor" in `sysconfig.py` that causes
`sysconfig.get_platform()` to return that value.
The logic in configure for deriving an appropriate platform tag
is a far cry from what's in `sysconfig.py`. Ideally that logic
would be fully (re)implemented in configure. But that's a
non-trivial amount of work.
Recognizing that configure makes inadequate platform tag decisions
during cross-compiles, this commit switches `_PYTHON_HOST_PLATFORM`
from a regular output variable to a "precious variable" (in autoconf
speak). This has the side-effect of allowing invokers to define the
variable, effectively allowing them to explicitly set the platform
tag during builds to a correct value when configure otherwise wouldn't
set one.
0 commit comments