Age | Commit message (Collapse) | Author |
|
(cherry picked from commit 71ee65dc5701a0675ae6b1879a694a28c7206a63)
|
|
(cherry picked from commit a14519426871341890b4257a64914b2761f8b055)
|
|
Fixes #74339.
(cherry picked from commit b7ecb9584a1fc141d70140f6b0e573d870fa0dcb)
|
|
Fix includes of thirdparty libs which can be unbundled on Linux
|
|
|
|
Changes `builtin_icu` and `builtin_recast` to match the folder names in
`thirdparty`.
|
|
The actual default value is neither true nor false but depends on the value
of `dev_build`.
Fixes #71812.
|
|
Also renames the option to just `build_profile`, the previous one was
too verbose and had words in the wrong order.
Fixes #70643.
|
|
- Use -gdwarf-4 to support both LLVM and GCC when calling addr2line
- Subtract position-independant execuable relocation when passing the
address to addr2line
|
|
This avoids confusion with the old `bits=64` option and building
for 64-bit CPUs in general.
|
|
This is equivalent to calling `strip` on the resulting binary, which is what
we do for official builds.
This applies for GCC/Clang.
For MSVC `/DEBUG:NONE` should already be the default.
|
|
|
|
Polish rendering driver refactor further
|
|
Replace all TODO uses of `#warning` by proper TODO comments, and will open
matching bug reports to keep track of them.
We don't have a great track record fixing TODOs, but I'd wager we're even
worse for fixing these "TODO #warning" so we should prohibit this usage.
|
|
- Outright disable spammy warnings due to past or present GCC bugs:
* `-Wno-strict-overflow` for GCC 7.
* `-Wno-type-limits` for GCC before 11 (regressed in 9/10, might work in
earlier releases but at this stage we don't care).
* `-Wno-return-type` for GCC 12/13 (regression, still not fixed).
- Enable extra warnings conditionally when broken on earlier GCC:
* `-Wnoexcept` was removed due to an upstream regression in GCC 9, could
be re-enabled (but commented out for now as we actually have `-Wnoexcept`
warnings to fix.
* `-Wlogical-op` was broken on our variadic templates before GCC 11, now
seems fine.
|
|
change warnings=all to use /W4.
|
|
Mainly:
- Make `max_descriptors_per_pool` project setting Vulkan-specific.
- Use a common, render driver agnostic magic FourCC for shader binary data.
- Downgrade spirv_reflect to Vulkan-only dependency.
- Add a `RENDER_DRIVER_*` macro to GLSL shader code for per-driver customizations.
|
|
|
|
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.
|
|
- `_DEBUG` is MSVC specific so it didn't make much sense to define for
Android and iOS builds.
- iOS was the only platform to define `DEBUG`. We don't use it anywhere
outside thirdparty code, which we usually don't intend to debug, so it
seems better to be consistent with other platforms.
- Consistently define `NDEBUG` to disable assert behavior in both `release`
and `release_debug` targets. This used to be set for `release` for all
platforms, and `release_debug` for Android and iOS only.
- Due to the above, I removed the only use we made of `assert()` in Godot
code, which was only implemented for Unix anyway, should have been
`DEV_ENABLED`, and is in PoolAllocator which we don't actually use.
- The denoise and recast modules keep defining `NDEBUG` even for the `debug`
target as we don't want OIDN and Embree asserting all over the place.
|
|
Fixup to #63288.
See #65583 for the bug report.
Co-authored-by: Cyberrebell <chainsaw75@web.de>
|
|
This makes it possible to retrieve all relevant versioning info used to
generate `core/version_generated.gen.h` in the buildsystem.
Notably it makes the custom logic parsing the `GODOT_VERSION_STATUS`
environment variable to override status easy to reuse.
|
|
Adds support for LTO on macOS and Android. We don't have much experience
with LTO on these platforms so for now we keep it disabled by default
even when `production=yes` is set.
Similarly for iOS where we ship object files for the user to link in
Xcode so LTO makes builds extremely slow to link.
`production=yes` defaults to full LTO.
ThinLTO is much faster for LLVM-based compilers but seems to produce
bigger binaries (at least for the Web platform).
|
|
Fixes #54434.
Co-authored-by: Daniel Moody <daniel.moody@mongodb.com>
|
|
|
|
Fixes #65233.
|
|
Also rename export name from "HTML5" to "Web".
|
|
Fully removes the `bits` option and adapts the code that relied on it.
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
|
|
|
|
Modules can now call:
env.module_add_dependencies(name: str, deps: list, optional: bool)
To add required or optional dependencies during the "can_build" step.
Required dependencies will be checked and the module will be not be
enabled when they are missing, printing a warning to notify the user.
|
|
Adds SCons options to disable Brotli and Graphite.
Adds option categories to the build profiles editor.
Adds options default state to the build profiles editor.
Adds Text Server related options to the build profiles editor.
Fix misplaced OpenGL/Vulkan SCons options.
|
|
SCons: Prevent using `vsproj` option outside Windows
|
|
Fixes #63305.
|
|
|
|
This PR is a continuation of #50381 (which was implemented exactly a year ago!)
* Add a visual interface to select which classes should not be built into Godot (well, they are built if something else uses them, but if not used the optimizer will remove them out).
* Add a detection system to scan the project and figure out the actual classes used.
* Added the ability for SCons to load build profiles.
Obligatory Screen:
A simple test with a couple of nodes in the scene resulted in a 25% reduction for the final binary size
TODO:
* Script languages need to implement used class detection (left for another PR).
* Options to disable servers or server functionalities (like 2D or 3D physics, navigation, etc). Are missing, that should also greatly aid in reducing binary size.
* Options to disable some modules would be desired.
* More options to disable drivers (OpenGL, Vulkan, etc) would be desired.
In general this PR is a starting point for more contributors to improve and enhance this functionality.
|
|
|
|
This doesn't change the behavior when `--jobs`/`-j` is specified as a
command-line argument or in `SCONSFLAGS`.
The SCons hack used to know if `num_jobs` was set by the user is derived
from the MongoDB setup.
We use `os.cpu_count()` for portability (available since Python 3.4).
With 4 CPUs or less, we use the max. With more than 4 we use max - 1 to
preserve some bandwidth for the user's other programs.
|
|
|
|
|
|
We shouldn't presume that future compilers will not have false positives or
find new occurrences of this warning, which would break compiling old versions
of the engine without passing custom `CXXFLAGS`.
Follow-up to #60652.
|
|
Works around and thus closes #58747.
Supersedes #60613.
|
|
SConstruct change also makes it possible to outright delete the `editor`
folder in a `tools=no` build, which we use in CI to ensure no invalid
cross-dependencies are added.
|
|
|
|
It has been disabled in `master` since one year (#45852) and our plan
is for Bullet, and possibly other thirdparty physics engines, to be
implemented via GDExtension so that they can be selected by the users
who need them.
|
|
|
|
Saves around 3 s on incremental rebuilds to have it disabled by default.
Can be enabled with `compiledb=yes`.
|
|
This reverts #53828 which had caused a significant drop in incremental
rebuild time for debug builds (from 10s to 23s on my laptop).
The "faster but unsafe" options are re-added, as well as adding
`max_drift=60` which we didn't use previously.
These options speed up SCons' own processing of the codebase to decide
what to build/rebuild (i.e. the first step before actually calling the
compiler). This will therefore not make much difference for scratch
builds, and is mostly useful for incremental rebuilds (including "null"
rebuilds with no change).
These options are enabled automatically for `debug` builds, unless
`fast_unsafe=no` is passed.
They are disabled by default for `release` and `release_debug` builds,
unless `fast_unsafe=yes` is passed.
|
|
with Python 3.6 and import against helper modules's parent path
|
|
shadowing
|
|
|