Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Doc/using/configure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1210,6 +1210,20 @@ the version of the cross compiled host Python.

.. versionadded:: 3.11

.. option:: --enable-cross-run

Enable running the target CPython binary on the build host during
cross-compilation.

By default, the build system assumes that target binaries cannot be executed
on the build host when cross-compiling which can disable optimizations such
as PGO.

When `--enable-cross-run` is used, the build system may attempt to execute
the target binaries, which is appropriate for situations where emulated
execution is transparently available.

.. versionadded:: 3.15

Cross compiling example::

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Add ```--enable-cross-run`` to allow execution of the target binary (e.g.,
for PGO) during cross-compilation.
27 changes: 26 additions & 1 deletion configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1630,8 +1630,19 @@ else # shared is disabled
fi
AC_MSG_RESULT([$LDLIBRARY])

# Check for --enable-cross-run
AC_ARG_ENABLE([cross-run],
[AS_HELP_STRING([--enable-cross-run],
[allow running target binaries during cross-compilation (default is no)])],
[],
[enable_cross_run=no])

if test "$cross_compiling" = yes; then
RUNSHARED=
AC_MSG_CHECKING([whether to keep RUNSHARED for cross build])
AS_IF([test "$enable_cross_run" = yes],
[AC_MSG_RESULT([yes (--enable-cross-run)])],
[RUNSHARED=
AC_MSG_RESULT([no])])
fi

# HOSTRUNNER - Program to run CPython for the host platform
Expand Down
Loading