Skip to content
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

Change build flags in Godot 4 docs to current variants #6375

Closed
wants to merge 2 commits into from
Closed
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
42 changes: 14 additions & 28 deletions development/compiling/compiling_for_linuxbsd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,36 +149,22 @@ manager.

.. note:: If you are compiling Godot for production use, then you can
make the final executable smaller and faster by adding the
SCons option ``target=release_debug``.

If you are compiling Godot with GCC, you can make the binary
even smaller and faster by adding the SCons option ``use_lto=yes``.
As link-time optimization is a memory-intensive process,
this will require about 7 GB of available RAM while compiling.
SCons option `production=yes`.

If you wish, you can also enable features piecemeal with
`optimize=speed` and/or `lto=full` which will enable
speed optimizations and link-time optimizations independently.

In particular, you may not be able to build with LTO on with a weaker computer,
as it can use quite a lot of RAM (up to 7GB). In this case, you may still be able to get
some benefits with weaker (but more memory-friendly) settings such as `lto=thin`, or
`lto=auto` which should choose a reasonable configuration for your machine.

.. note:: If you want to use separate editor settings for your own Godot builds
and official releases, you can enable
:ref:`doc_data_paths_self_contained_mode` by creating a file called
``._sc_`` or ``_sc_`` in the ``bin/`` folder.

Compiling a headless/server build
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this functionality removed?
Can't find anything in the original PR: godotengine/godot#66242

Copy link
Author

Choose a reason for hiding this comment

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

As I mentioned in the original post, I couldn't find how to do this, so I removed it so as not to give bad instructions. I'll probably revert this because another PR seems to fix the headless build instructions.

---------------------------------

To compile a *headless* build which provides editor functionality to export
projects in an automated manner, use::

scons -j8 platform=server tools=yes target=release_debug

To compile a debug *server* build which can be used with
:ref:`remote debugging tools <doc_command_line_tutorial>`, use::

scons -j8 platform=server tools=no target=release_debug

To compile a *server* build which is optimized to run dedicated game servers,
use::

scons -j8 platform=server tools=no target=release

Building export templates
-------------------------

Expand All @@ -197,15 +183,15 @@ following parameters:

::

scons platform=linuxbsd tools=no target=release bits=32
scons platform=linuxbsd tools=no target=release_debug bits=32
scons platform=linuxbsd tools=no production=yes bits=32
scons platform=linuxbsd tools=no production=yes optimize=speed_trace bits=32

- (64 bits)

::

scons platform=linuxbsd tools=no target=release bits=64
scons platform=linuxbsd tools=no target=release_debug bits=64
scons platform=linuxbsd tools=no optimize=speed bits=64
scons platform=linuxbsd tools=no target=speed_trace bits=64

Note that cross-compiling for the opposite bits (64/32) as your host
platform is not always straight-forward and might need a chroot environment.
Expand Down