Commit Graph

12 Commits

Author SHA1 Message Date
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
Rémi Verschelde
8be8577da6 SCons: Remove redundant -fomit-frame-pointer and -ftree-vectorize
- `-fomit-frame-pointer` is included automatically by both GCC and
  Clang in `-O1` and above.
- `-ftree-vectorize` is included automatically by GCC in `-O2` and
  beyond, and seems always enabled by Clang.

Closes #66296. See that issue for a detailed investigation.

(cherry picked from commit c5c3d13dc0dbbf95a2350f57d69e7cdc546d395d)
2022-12-11 19:12:18 +01: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
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
bruvzg
11cebc25fa Use clang as assembler to ensure preprocessing is done, and add assembler "target" flag.
(cherry picked from commit e87377856174075e38b6d2ca338f28ffa0d9f59f)
2022-09-16 21:44:01 +02:00
a5381e1c18 Fix typo. 2022-08-02 16:29:52 +02:00
9d76074b58 Ported: Add full support for Android scoped storage.
This was done by refactoring directory and file access handling for the Android platform so that any general filesystem access type go through the Android layer.
This allows us to validate whether the access is unrestricted, or whether it falls under scoped storage and thus act appropriately.
- m4gr3d
24e3b3b88d
2022-07-29 19:24:07 +02:00
baad7f01a0 Ported:Upgrade Android NDK to r23 LTS - madmiraal
061c280873
2022-07-29 18:12:25 +02:00
Hugo Locurcio
c0c4418ce7 Increase compiler optimization when using target=release on iOS/Android
(cherry picked from commit 78b4ec2d4d0d6233ca0f4d8cfeb74640063e970f)
2022-07-27 18:48:04 +02:00
32f148ac0c Mass replaced godot to pandemonium. 2022-03-23 20:46:05 +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
49f8e8c398 Added godot with all my currently used engine modules. 2022-03-15 13:29:32 +01:00