Commit Graph

36 Commits

Author SHA1 Message Date
David Snopek
588d869a3b Merge pull request #1313 from DmitriySalnikov/visibility_hidden
[Scons] Added the ability to change the visibility of symbols
2023-11-24 07:15:52 -06:00
DmitriySalnikov
79d2a9c456 [Scons] Set the minimum Android API level to 21 2023-11-23 00:28:03 +03:00
DmitriySalnikov
f5e4f95cde [Scons] Added the ability to change the visibility of symbols 2023-11-21 18:55:02 +03:00
bruvzg
e854e0b592 [iOS] Bump default version to 12 to match engine. 2023-11-21 09:39:53 +02:00
Thaddeus Crews
648b8c4489 fix is_msvc and use_hot_reload variables 2023-11-06 10:50:19 -06:00
Fredia Huya-Kouadio
86dbd5fa0d Update the environment variables used to access the Android NDK toolchain 2023-11-01 12:14:55 -07:00
Rémi Verschelde
bf1c03ab5f SCons: Disable C++ exception handling by default
Counterpart to https://github.com/godotengine/godot/pull/80612.
2023-10-22 12:45:46 +02:00
Adam Scott
2d5024ac8e Refactor compiledb implementation
This comment enables the possibility to build the "compile_commands.json"
file by only using `scons -Q compiledb`. No need to use the argument
`compiledb=yes`.

And when using the `compiledb=yes`, it will create a
"compiled_commands.json" automatically.
2023-10-19 10:51:31 -04:00
Thaddeus Crews
7a5cbcac21 Let gdextension_dir function as only argument 2023-10-18 11:32:51 -05:00
Fabio Alessandrelli
18bfa133ab [SCons] Rename javascript tool to web
And clean it up a bit.
2023-10-15 13:12:49 +02:00
David Snopek
96bec613a0 Merge pull request #1247 from nicholas-maltbie/nickmaltbie/javascript-wasm-fix
Javascript Web WASM Fix
2023-10-04 09:58:01 -05:00
Nick Maltbie
2b4bcbb0ce Added fix for javascript build for godot 4.x
Added changes to tools/javascript.py to add PFlags to fix SharedArrayBuffer memory error.
Corrected some small errors in tools/javascript.py to support new target names.
Also updated ci to include validation for web build.
2023-10-01 13:43:19 -07:00
David Snopek
df849651d9 Changes necessary for hot reload to work 2023-09-25 22:13:33 -05:00
DmitriySalnikov
0e5975dd26 [SCons] Fixed crashes in several scripts 2023-09-09 12:44:14 +03:00
Fabio Alessandrelli
f8b4f60cb9 [SCons] Move the GodotCPP build to its own tool. 2023-08-29 18:14:42 +02:00
Rémi Verschelde
600e749d9b SCons: Sync targets.py fully with upstream Godot
- Reorders existing code to match Godot.
- Adds `NDEBUG` for non-dev builds.
- Adds `-gdwarf-4` for Clang debug symbols.
- Adds strip link flag for GCC/Clang builds without debug symbols.
2023-08-10 09:23:32 +02:00
Feiyun Wang
a745c2ac47 Statically link mingw/msvc runtime libraries on Windows
Co-authored-by: David Snopek <dsnopek@gmail.com>
2023-08-09 13:38:38 -05:00
David Snopek
845226d66a Merge pull request #1191 from Faless/build/unify_osxcross
[SCons] Merge OSXCross tools into platform ones
2023-07-31 15:40:27 -05:00
Adam Scott
9d9f4279ed Add platform macros 2023-07-23 19:23:01 -04:00
Fabio Alessandrelli
6d195137fe [SCons] Merge OSXCross tools into platofrm ones 2023-07-23 22:54:07 +02:00
bruvzg
d1aeba771a [MSVC] Force UTF-8 encoding. 2023-07-11 16:11:51 +03:00
Fabio Alessandrelli
8d6982be3b [SCons] Platform agnostic default toolchain (GNU).
Create the SCons Environment with an empty PLATFORM variable to force
the default tools to use the GNU toolchain.

Platform specific toolchains are then setup in our custom tools.
2022-12-20 17:41:34 +01:00
Fabio Alessandrelli
edf02f8319 [SCons] Link MSVC debug runtime for optimize=none|debug only.
Select windows runtime in "targets" tool, use "/MDd" flag only when
building with optimize="none" and optimize="debug".
2022-11-21 11:04:10 +01:00
bruvzg
6e7a24d390 Fix Android build on macOS. 2022-11-10 15:20:15 +02:00
Fabio Alessandrelli
35ec1403dc [SCons] Remove bogus CCFLAGS from windows toolchain.
The c++ standard is added as part of the main SConstruct
2022-11-02 16:45:38 +01:00
Fabio Alessandrelli
64b2c9be0b [SCons] Refactor targets, symbols, optimizations.
Now matches Godot `master` target names and supports the same flags with
the following notable exceptions:
- The default target is "template_debug", since it's compatible with
  editor builds (and TOOLS_ENABLED is never used internally).
- separate_debug_symbols is still not supported, and will be done in a
  separate commit.
2022-10-04 16:05:40 +02:00
Fabio Alessandrelli
2bf983e638 [SCons] Add "optimize" and "debug_symbols" options
optimize = auto|none|debug|speed|size|0|1|2|3
debug_symbol = True|False

optimize == "auto" will produce:
- "debug" for "debug" builds
- "speed" for "release" builds
2022-09-12 16:52:05 +02:00
Fabio Alessandrelli
081d425277 [MSVC] Add NOMINMAX flag to scons and cmake.
Ensures user inclusion of windows.h do not define "min" and "max"
macros.
2022-09-12 13:12:55 +02:00
Kevin Smith
7f44a1b44e Add debug information to Windows builds
Previously, Windows builds were being produced without debug
information, leading to somewhat unhelpful backtraces etc.
without symbols.

This builds the symbols in (only for debug builds - I've
deliberately not touched release builds here) so gdextension
bugs are a little more tractable.

Test-Information:
Have been running this patch for weeks, and getting useful
traces out on the commandline, and useful debugging from
debuggers.
2022-07-28 20:37:44 +01:00
Fabio Alessandrelli
0943dfc34a [CI] Fix Android builds after GH container update. 2022-07-28 06:30:04 +02:00
bruvzg
0ee980abae Rename OSX to macOS. 2022-07-20 11:01:47 +03:00
Kevin Smith
b038fe556b Add clang-cl support
Visual C++ has a clang-based driver, available through the
clang-cl wrapper (which provides the same interface as
cl) - this generates objects binary-compatible with the
default (traditional) driver, and can then be linked in
the normal way. As such, this patch simply configures for
MSVCC and then overwrites the cl compiler with clang-cl
in the environment.

Clang gives (subjectively) much more understandable compiler warnings
and errors than MSVCC, which was my motivation for switching.

Test-Information:
Builds for me with VS2022, and my gdextension library
builds and links.
2022-07-12 18:13:25 +01:00
Fabio Alessandrelli
7901986dcf [SCons] Fix msvc, linux-clang, add version check. 2022-07-04 18:00:29 +02:00
Fabio Alessandrelli
7850785ccb [SCons] Add iOS OSXCross support, min version override. 2022-06-27 20:44:12 +02:00
Fabio Alessandrelli
8dbfe03d17 [SCons] Add OSXCross tool. 2022-06-27 20:44:12 +02:00
Fabio Alessandrelli
93f2091185 [SCons] Move toolchains logic to tools folder. 2022-06-27 20:44:12 +02:00