8000 Refine Windows build section, explain config & add how to run by CAM-Gerlach · Pull Request #989 · python/devguide · GitHub
[go: up one dir, main page]

Skip to content

Refine Windows build section, explain config & add how to run #989

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 22, 2022
Merged
Changes from 1 commit
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
Next Next commit
Add -c Debug & note on changing build config/platform for Windows build
  • Loading branch information
CAM-Gerlach committed Nov 22, 2022
commit 4884ed5853e4f48a4ffab7dc28d42ec96f78f151
27 changes: 24 additions & 3 deletions getting-started/setup-building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,31 @@ are downloaded:

.. code-block:: dosbatch

PCbuild\build.bat
PCbuild\build.bat -c Debug
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PCbuild\build.bat -d is equivalent.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah; as mentioned above

I considered [and went back and forth on] -d, but went with the former [-c Debug] to be more clear and explicit, and consistent with setting other build configs [as mentioned in the following paragraph]

but if you feel strongly otherwise, I can go back to -d (its what I would use for the quick step by step reference guide, at least)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There aren't really any other interesting build configs. To do a PGO build, you'd pass --pgo, and you get a release build by omitting -d and --pgo. The fully customisable configuration is very legacy, though occasionally helpful for more intense debugging needs (i.e. not something the devguide is going to cover)


The above command line build uses the ``-c Debug`` argument
to build in the ``Debug`` configuration,
which enables checks and assertions helpful for developing Python.
By default, it builds in the ``Release`` configuration
and for the 64-bit ``x64`` platform rather than 32-bit ``Win32``;
use ``-c`` and ``-p`` to control build config and platform, respectively.

After this build succeeds, you can open the ``PCbuild\pcbuild.sln`` solution
in the Visual Studio IDE to continue development, if you prefer.
When building in Visual Studio,
make sure to select build settings that match what you used with the script
(the :guilabel:`Debug` configuration and the :guilabel:`x64` platform)
from the dropdown menus in the toolbar.

After this build succeeds, you can open the ``PCbuild\pcbuild.sln`` solution in
Visual Studio to continue development.
.. note::

If you need to change the build configuration or platform,
build once with the ``build.bat`` script set to those options first
before building with them in VS to ensure all files are rebuilt properly,
or you may encouter errors when loading modules that were not rebuilt.

Avoid selecting the ``PGInstrument`` and ``PGUpdate`` configurations,
as these are intended for PGO builds and not for normal development.

See the `readme`_ for more details on what other software is necessary and how
to build.
Expand Down
0