19 Commits

Author SHA1 Message Date
Fabio Alessandrelli
71b5b84fb1 [Bindings] Build profile now strips methods and skip files
This allows removing dependencies that are not explicitly unused by the
gdextension being built and is implemented using an intermediate json
API file with the methods and classes stripped (i.e. without touching
the file generators).

(cherry picked from commit c4f1abe3f9)
2025-01-27 15:58:30 -06:00
Lukas Tenbrink
17818534d9 Add lto scons option, defaulting to "none". 2025-01-27 15:51:38 -06:00
Thaddeus Crews
810b0ce13e SCons: Don't cache librarys
(cherry picked from commit 83c0f15ab9)
2024-10-28 16:23:17 -05:00
Fabio Alessandrelli
aeb8be98ed [SCons] Add option to build without threads
This is relevant for the Web platform, where builds with and without
threads are incompatible.

(cherry picked from commit b0296bb562)
2024-09-03 17:10:30 -05:00
Thaddeus Crews
c35e7545b7 Integrate .pre-commit-config.yaml
(cherry picked from commit e0d363aad8)
2024-07-17 09:17:36 -05:00
Fabio Alessandrelli
528b7801d2 Add support for build profiles.
Allow enabling or disabling specific classes (which will not be built).

(cherry picked from commit 1186c488bd)
2024-07-17 09:06:07 -05:00
Thaddeus Crews
ef4d771444 Implement verbose toggle from godot repo
(cherry picked from commit b05c21bb1d)
2024-04-17 11:08:41 -05:00
Fabio Alessandrelli
1517a24f72 [SCons] Split targets.py, apply flags from tools
Split `targets` tool logic, moving all the compiler-specific flags to a
new `common_compiler_flags.py` file, and everything else (CPPDEFINES,
optimize option logic, dev build logic, etc) to the `godotcpp` tool.

The default tools now apply the common compiler flags by importing the
file and explicitly calling `configure`.

(cherry picked from commit 16df4bff30)
2024-03-11 12:46:58 -05:00
Fabio Alessandrelli
1b8cfaab71 [SCons] Add support for custom build tools and platforms
Use with:

`scons platform=os2 custom_tools=/path/to/tools`

(assuming you have an `os2.py` inside `/path/to/tools/`)

(cherry picked from commit baaad7ada2)
2024-03-11 12:46:48 -05:00
Aaron Franke
81a72ff06b Allow detecting when building as a GDExtension
(cherry picked from commit e17c7bf530)
2024-01-22 15:28:57 -06:00
DmitriySalnikov
f5e4f95cde [Scons] Added the ability to change the visibility of symbols 2023-11-21 18:55:02 +03:00
Thaddeus Crews
648b8c4489 fix is_msvc and use_hot_reload variables 2023-11-06 10:50:19 -06: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
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