godot/platform/linuxbsd
Rémi Verschelde 39facb35a0 SCons: Unify tools/target build type configuration
Implements https://github.com/godotengine/godot-proposals/issues/3371.

New `target` presets
====================

The `tools` option is removed and `target` changes to use three new presets,
which match the builds users are familiar with. These targets control the
default optimization level and enable editor-specific and debugging code:

- `editor`: Replaces `tools=yes target=release_debug`.
  * Defines: `TOOLS_ENABLED`, `DEBUG_ENABLED`, `-O2`/`/O2`
- `template_debug`: Replaces `tools=no target=release_debug`.
  * Defines: `DEBUG_ENABLED`, `-O2`/`/O2`
- `template_release`: Replaces `tools=no target=release`.
  * Defines: `-O3`/`/O2`

New `dev_build` option
======================

The previous `target=debug` is now replaced by a separate `dev_build=yes`
option, which can be used in combination with either of the three targets,
and changes the following:

- `dev_build`: Defines `DEV_ENABLED`, disables optimization (`-O0`/`/0d`),
  enables generating debug symbols, does not define `NDEBUG` so `assert()`
  works in thirdparty libraries, adds a `.dev` suffix to the binary name.

Note: Unlike previously, `dev_build` defaults to off so that users who
compile Godot from source get an optimized and small build by default.
Engine contributors should now set `dev_build=yes` in their build scripts or
IDE configuration manually.

Changed binary names
====================

The name of generated binaries and object files are changed too, to follow
this format:

`godot.<platform>.<target>[.dev][.double].<arch>[.<extra_suffix>][.<ext>]`

For example:
- `godot.linuxbsd.editor.dev.arm64`
- `godot.windows.template_release.double.x86_64.mono.exe`

Be sure to update your links/scripts/IDE config accordingly.

More flexible `optimize` and `debug_symbols` options
====================================================

The optimization level and whether to generate debug symbols can be further
specified with the `optimize` and `debug_symbols` options. So the default
values listed above for the various `target` and `dev_build` combinations
are indicative and can be replaced when compiling, e.g.:

`scons p=linuxbsd target=template_debug dev_build=yes optimize=debug`
will make a "debug" export template with dev-only code enabled, `-Og`
optimization level for GCC/Clang, and debug symbols. Perfect for debugging
complex crashes at runtime in an exported project.
2022-09-26 16:31:46 +02:00
..
export Update export dialog to handle many architectures 2022-07-29 10:24:58 -05:00
crash_handler_linuxbsd.cpp Crash handler: Use print_error to include backtrace in logs 2022-05-05 12:22:56 +02:00
crash_handler_linuxbsd.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00
dbus-so_wrap.c [Linux] Load dbus libraries dynamically. 2022-07-29 11:19:19 +03:00
dbus-so_wrap.h [Linux] Load dbus libraries dynamically. 2022-07-29 11:19:19 +03:00
detect_prime_x11.cpp Variant memory pools 2022-07-04 12:01:46 +01:00
detect_prime_x11.h Style: Cleanup header guards for consistency 2022-09-26 13:51:17 +02:00
detect.py SCons: Unify tools/target build type configuration 2022-09-26 16:31:46 +02:00
display_server_x11.cpp Merge pull request #65496 from MinusKube/popup-capture-mouse-bug 2022-09-16 09:23:40 +02:00
display_server_x11.h Fix MOUSE_MODE_CAPTURED not working correctly with popups 2022-09-07 19:31:57 +02:00
fontconfig-so_wrap.c [Linux] Replace fontconfig wrapper with a one generated from the older library version (2.12.6, Ubuntu 18.04 LTS). 2022-07-29 08:55:19 +03:00
fontconfig-so_wrap.h [Linux] Replace fontconfig wrapper with a one generated from the older library version (2.12.6, Ubuntu 18.04 LTS). 2022-07-29 08:55:19 +03:00
freedesktop_portal_desktop.cpp Add support for system dark mode (Linux) 2022-09-02 16:49:21 +02:00
freedesktop_portal_desktop.h Add support for system dark mode (Linux) 2022-09-02 16:49:21 +02:00
freedesktop_screensaver.cpp [Linux] Load dbus libraries dynamically. 2022-07-29 11:19:19 +03:00
freedesktop_screensaver.h [Linux] Load dbus libraries dynamically. 2022-07-29 11:19:19 +03:00
gl_manager_x11.cpp Fix multiwindow support in GLES3 for X11, Windows, and MacOS. 2022-09-12 17:30:50 -07:00
gl_manager_x11.h Re-enable per-pixel transparency support on Linux, macOS, and Windows (for Vulkan and OpenGL rendering drivers). 2022-09-03 19:16:03 +03:00
godot_linuxbsd.cpp Fix exit code of --help and --version, and test them in CI 2022-07-02 01:17:35 +02:00
joypad_linux.cpp Read and store joypad events in a separate thread on x11 platform 2022-05-05 07:51:54 +02:00
joypad_linux.h Read and store joypad events in a separate thread on x11 platform 2022-05-05 07:51:54 +02:00
key_mapping_x11.cpp Adding function key support from F17 to F35 2022-06-16 19:38:21 +02:00
key_mapping_x11.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
libudev-so_wrap.c An update to the dylibloader for older inttypes 2021-02-20 01:24:30 +01:00
libudev-so_wrap.h An update to the dylibloader for older inttypes 2021-02-20 01:24:30 +01:00
logo.png Effective DisplayServer separation, rename X11 -> LinuxBSD 2020-03-26 15:49:34 +01:00
os_linuxbsd.cpp Add get_distribution_name() and get_version() to OS 2022-09-16 11:17:36 +02:00
os_linuxbsd.h Add get_distribution_name() and get_version() to OS 2022-09-16 11:17:36 +02:00
pck_embed.ld Effective DisplayServer separation, rename X11 -> LinuxBSD 2020-03-26 15:49:34 +01:00
pck_embed.legacy.ld Effective DisplayServer separation, rename X11 -> LinuxBSD 2020-03-26 15:49:34 +01:00
platform_config.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
platform_linuxbsd_builders.py SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00
README.md Improve platform-specific READMEs to add useful links 2022-08-25 17:50:53 +02:00
SCsub Add support for system dark mode (Linux) 2022-09-02 16:49:21 +02:00
speechd-so_wrap.c Implement text-to-speech support on Android, iOS, HTML5, Linux, macOS and Windows. 2022-04-28 14:35:41 +03:00
speechd-so_wrap.h Implement text-to-speech support on Android, iOS, HTML5, Linux, macOS and Windows. 2022-04-28 14:35:41 +03:00
tts_linux.cpp Implement text-to-speech support on Android, iOS, HTML5, Linux, macOS and Windows. 2022-04-28 14:35:41 +03:00
tts_linux.h Replace most uses of Map by HashMap 2022-05-16 10:37:48 +02:00
vulkan_context_x11.cpp Style: Cleanup single-line blocks, semicolons, dead code 2022-02-16 14:06:29 +01:00
vulkan_context_x11.h Code quality: Fix header guards consistency 2022-07-25 11:17:40 +02:00

Linux/*BSD platform port

This folder contains the C++ code for the Linux/*BSD platform port.

See also misc/dist/linux folder for additional files used by this platform.

Documentation

Artwork license

logo.png is derived from the Linux logo:

Permission to use and/or modify this image is granted provided you acknowledge me lewing@isc.tamu.edu and The GIMP if someone asks.