Commit Graph

49 Commits

Author SHA1 Message Date
85e7f7327e Fix and enable the gles3 renderer by default. 2024-07-16 19:44:22 +02:00
9d6680ce6d Adding back the GLES3 renderer pt1. Unlike in godot it can be disabled compile time. It will be enabled afer if works. 2024-07-16 00:14:10 +02:00
a310ae5238 Added back the raycast module with embree built in. 2024-07-15 21:44:37 +02:00
d899382c30 Added back the xatlas_unwrap module. Also moved xatlas into it so it's not in the thirdparty folder. 2024-07-15 20:21:33 +02:00
Programneer
fa194fc9e4 Don't define NO_EDITOR_SPLASH in export templates 2024-07-14 08:43:42 +02:00
totlmstr
6db0214bfa Add option modules_enabled_by_default and minimal CI build
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: aaronfranke <arnfranke@yahoo.com>
2024-04-21 14:21:51 +02:00
08711274c7 Fix custom module paths for the editor builds. 2024-02-17 16:41:51 +01:00
Rémi Verschelde
33874920cb SCons: Enable /WX on LINKFLAGS for MSVC with werror=yes
(cherry picked from commit 30bdb23f03dd90ca255ca6d8fb035f94250b668c)
2023-08-30 10:30:12 +02:00
5ae44c4746 Ported: SCons: Disable C++ exception handling
Upon investigating the extremely slow MSVC build times in #80513, I noticed
that while Godot policy is to never use exceptions, we weren't enforcing it
with compiler flags, and thus still included exception handling code and
stack unwinding.

This is wasteful on multiple aspects:

- Binary size: Around 20% binary size reduction with exceptions disabled
  for both MSVC and GCC binaries.
- Compile time:
  * More than 50% build time reduction with MSVC.
  * 10% to 25% build time reduction with GCC + LTO.
- Performance: Possibly, needs to be benchmarked.

Since users may want to re-enable exceptions in their own thirdparty code
or the libraries they compile with Godot, this behavior can be toggled with
the `disable_exceptions` SCons option, which defaults to true.
- akien-mga
55550da68b
2023-08-27 13:04:04 +02:00
834cbe8cef Ported: Single Compilation Unit build.
Adds support for simple SCU build.
This speeds up compilation by compiling multiple cpp files within a single translation unit.
- lawnjelly
43e181a00a
2023-07-11 16:07:36 +02:00
f058c87868 Backported from godot4: Rework Navigation Avoidance
Rework Navigation Avoidance.
- smix8
a6ac305f96
2023-06-10 20:58:49 +02:00
b016f192a4 Now modules in custom folders can properly declare their copyright.txt. 2023-01-23 21:57:37 +01:00
f70e207741 Added support for specifying a COPYRIGHT.txt file for modules. 2022-12-31 18:12:06 +01:00
213f393293 Fix typos with codespell. 2022-12-22 19:51:25 +01:00
9b1857ec62 Ported: SCons: Fix MSVC D9025 warning overriding opt level
And cleanup disable_warnings too to avoid setting `/w` / `-w` multiple times.
- akien-mga
39b1c06a59
2022-12-22 17:54:57 +01:00
91e598aa7b Ported: SCons: Cleanup DEBUG, _DEBUG and NDEBUG defines
- `_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.
- akien-mga
b0b759e6da
2022-12-22 17:42:54 +01:00
afc171a4a4 Added a new editor_docs setting to the build. Disabling it can help when quick iteration times are desired. Setting it to false saves about 4 seconds of compile time for me (in the current stripped slim build that I'm working on). 2022-11-16 12:56:01 +01:00
911257b606 Always enable exception support when using mscv (for now), to avoid warnings. 2022-10-11 11:18:08 +02:00
4888a14fa0 Seems like EHr- is not needed. 2022-10-09 10:49:14 +02:00
fb4873baf3 Remove an another /EHsc flag. 2022-10-09 10:45:07 +02:00
47ee4c6415 Clean up exception ahndling and rtti flags for msvc. 2022-10-09 10:41:24 +02:00
7316ac8bd0 Don't use undefined variables. 2022-10-09 10:32:21 +02:00
2e555d118e Add msvc versions of the no-rtti and no-exceptions options. 2022-10-09 10:22:59 +02:00
Rémi Verschelde
36356df17e SCons: Add methods.get_version_info() method returning a Dict
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.

(cherry picked from commit d432fe38a9a65b9e84964a7393c9fe4ce22361a3)
2022-10-08 16:28:01 +02:00
Rémi Verschelde
fe5d1cc8ff SCons: Refactor handling of production flag and per-platform LTO defaults
Fixup to #63288.
See #65583 for the bug report.

Co-authored-by: Cyberrebell <chainsaw75@web.de>
(cherry picked from commit 35a15e619161798820b2bd6ff46178c5b7ccebcf)
2022-10-08 16:18:23 +02:00
Rémi Verschelde
b15f19911e SCons: Fix compilation database generation with MSVC
Fixes #54434.

Co-authored-by: Daniel Moody <daniel.moody@mongodb.com>
(cherry picked from commit 22381d9d074f77f4acb700c4d765e44e3f0727f7)
2022-09-17 00:02:24 +02:00
Rémi Verschelde
67ea3b41f5 SCons: Enforce version 4.0+ when compiledb=yes is used
Fixes #65233.

(cherry picked from commit 6c5e085d1317df8576b78f0f0ca90a2fff364664)
2022-09-16 23:10:16 +02:00
Rémi Verschelde
c708c44180 SCons: Refactor LTO options with lto=<none|thin|full>
Adds support for LTO on macOS and Android.
Disable LTO by default on iOS even if `production=yes` is set.

Also add `linker` option to `server` platform missed in #63283.

Refactor code handling old arguments to make it simpler (breaks compat,
but is explicit enough about it and scripts are easy to fix).
2022-09-16 22:54:09 +02:00
95767b2cea Moved the editor only modules to a new editor_modules folder. 2022-08-19 22:46:53 +02:00
3df74faf8c Removed the old dependency sorting system. 2022-08-18 12:54:39 +02:00
91fe9ed8ca Backported: [Scons] Implement module dependency sorting.
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.
- Faless
951a1016d3
2022-08-18 12:44:45 +02:00
4732493761 Backported: SCons: Validate dependencies for linked multimedia modules
This is still a bit hacky and eventually we should rework the way we handle
optional dependencies (especially with regard to builtin/system libs), but
it's a simple first step.
- akien-mga
7c74312217
2022-08-18 12:25:38 +02:00
6f66cad2cb Main build script: Properly set module_ name _enabled in environment to false for modules that get disabled using can_build(). 2022-08-07 20:46:39 +02:00
Rémi Verschelde
4a453e6121 SCons: Prevent using vsproj option outside Windows
Fixes #63305.

(cherry picked from commit 4e56f96396cceb9f32674b6ca57a2777c8b5521c)
2022-07-29 22:39:07 +02:00
bruvzg
561314ee93 Add ios and macos platform name aliases. 2022-07-29 22:34:45 +02:00
Marcel Admiraal
4a2bccd2d3 Only include editor/SCsub when building the editor: tools=yes
(cherry picked from commit 2efe9a89bb2b352c50429b7bb3c1accafc8662d1)
2022-07-29 20:35:42 +02:00
baad7f01a0 Ported:Upgrade Android NDK to r23 LTS - madmiraal
061c280873
2022-07-29 18:12:25 +02:00
Rémi Verschelde
9cbdec7d87 SCons: Don't enable any -Werror=return-type outside werror=yes
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.

(cherry picked from commit e55d30768a83f027f2c36e106e0ad5320723709d)
2022-07-27 14:26:16 +02:00
Rémi Verschelde
721c41ee47 SCons: Disable -Werror=return-type for GCC 12+ due to regression
Works around and thus closes #58747.
Supersedes #60613.

(cherry picked from commit 01f8f17b67eb3ebbde5489eb6ee96d332e368d14)
2022-07-27 14:25:59 +02:00
2a5e0ae0f8 Ported https://github.com/godotengine/godot/pull/53443 . 2022-07-06 18:37:38 +02:00
e419b12067 Also removed remnants of the core xatlas. 2022-04-02 12:41:05 +02:00
8009d32185 Removed remnants of libvpx and libwebp. 2022-04-02 12:34:15 +02:00
32f148ac0c Mass replaced godot to pandemonium. 2022-03-23 20:46:05 +01:00
d1587aaa6b Removed bullet. 2022-03-23 13:28:35 +01:00
3e97039c99 Added compile options for rtti and exceptions. They are disabled by default. They used to be enabled on most platforms, it does not seem to break anything. 2022-03-18 17:04:14 +01:00
e85cef1745 Run godot's formatting script. 2022-03-16 09:02:48 +01:00
00285e8b24 Removed the gles3 driver. There are still mentions of it in a few places, I did not removed all of those. 2022-03-15 17:01:21 +01:00
ba4cda4890 Removed the lightmap_raycast module along with embree. 2022-03-15 15:37:28 +01:00
49f8e8c398 Added godot with all my currently used engine modules. 2022-03-15 13:29:32 +01:00