summaryrefslogtreecommitdiff
path: root/SConstruct
AgeCommit message (Collapse)Author
2021-09-28Force optimized builds for thirdparty Embree filesjfons
2021-09-15Allow disabling the RegEx module in the editorAaron Franke
2021-08-27Makes FontData importable resource.bruvzg
Adds multi-channel SDF font texture generation and rendering support. Adds per-font oversampling support. Adds FontData import plugins (for dynamic fonts, BMFonts and monospaced image fonts), font texture cache pre-generation and loading. Adds BMFont binary format and outline support.
2021-08-22Replace HTTP links with HTTPS for sites with HTTPS versionsAaron Franke
2021-08-12Use "volk" instead of statically linked Vulkan loader.bruvzg
2021-08-09Some work on double supportAaron Franke
2021-08-09Merge pull request #51427 from omar-polo/platform-detect-openbsdRémi Verschelde
automatically detect openbsd as platform=linuxbsd
2021-08-09automatically detect BSDs as platform=linuxbsdOmar Polo
2021-08-06SCons: Add method to detect Emscripten and use it for warnings configRémi Verschelde
Emscripten is LLVM-based so we want to follow the same logic. But we can't just put it as a match in `methods.using_clang()` as that would mess with the compiler version detection logic used to restrict old GCC and Clang releases.
2021-08-06SCons: Disable Clang -Wordered-compare-function-pointers warningRémi Verschelde
It's raised for us on many comparators implemented to be able to store a struct in `Set` or `Map` (who rely on `operator<` internally). In the cases I reviewed we don't actually care about the ordering and we use the struct's function pointers as that's the only distinctive data available.
2021-07-20SCons: Avoid using Python f-string to preserve Python 3.5 compatRémi Verschelde
Fixes #50629.
2021-07-13Implement the ability to disable classesreduz
* This PR adds the ability to disable classes when building. * For now it's only possible to do this via command like: `scons disable_classes=RayCast2D,Area3D` * Eventually, a proper UI will be implemented to create a build config file to do this at large scale, as well as detect what is used in the project.
2021-07-08Add elapsed time print statement to build systemHendrik Brucker
2021-06-21Print a notice when compiling with `target=debug`Hugo Locurcio
Debug builds are considerably slower than release builds or even release_debug builds. `target=debug` is still the default SCons target option, so unsuspecting users may be compiling unoptimized debug builds for their personal use.
2021-06-01LinuxBSD now compiles without vulkan/x11.Fabio Alessandrelli
2021-06-01Remove server platformFabio Alessandrelli
2021-05-31Improve compiler version extractionMmAaXx500
2021-05-04Port changes to the "raycast" module build files from 3.xjfons
2021-04-10Add option modules_enabled_by_defaulttotlmstr
2021-03-23Merge pull request #44398 from RevoluPowered/unit-tests-for-export-templatesRémi Verschelde
Add unit tests for export templates
2021-03-22Add unit tests for export templatesGordon MacPherson
2021-03-20Merge pull request #46966 from qarmin/faster_releaseRémi Verschelde
Allow to not optimize release build
2021-03-14Allow to not optimize release buildRafał Mikrut
2021-03-14Merge pull request #46799 from goostengine/module-includesRémi Verschelde
Provide missing include path for custom modules
2021-03-12Fixes small typos and grammar correctionAnshul7sp1
2021-03-10SCons: Use default env["ENV"] and prepend PATH to itRémi Verschelde
See discussion in #46814. Now going with the safe option again (like in 3.2) as it turns out that we can't rely on user environments on Windows, since each shell has a different set of env variables (especially the ones necessary to use MSVC). SCons does its own magic when we don't pass it an `ENV` dictionary, so we should preserve it and only add things in a second step. Fixes this warning when compiling with MSVC using git-bash.exe: ``` Missing environment variable: WindowsSdkDir ``` Possibly fixes build issues when having both MinGW and MSVC installed and an older SCons version.
2021-03-09SCons: Propagate the user's OS environment in env["ENV"]Rémi Verschelde
This fixes a regression from #46774 where `env["ENV"]` would miss some important env variables on Windows, such as `SystemRoot`, `PATHEXT`, etc. To have those, we can either use the default `ENV` created by SCons, or propagate the whole external environment. Fixes #46790.
2021-03-08Provide additional include paths for custom modulesAndrii Doroshenko (Xrayez)
Allows to use a module as a library, where an include path may start with module's name itself.
2021-03-07SCons: Fix parsing PATH when constructing base environmentRémi Verschelde
We constructed the SCons environment without taking any (shell) environment variables into account, and then appended a few, but too late. This would cause variables like `env[CXX]` not to be properly expanded to respect a non-standard `PATH`. With this fix, setting: ``` PATH=$GODOT_SDK/bin:$PATH ``` will now properly use `$GODOT_SDK/bin/gcc` if available over `/usr/bin/gcc`.
2021-02-25SCons: Fix profile type. It is a stringMateo Kuruk Miccino
2021-02-24SCons: Properly handle overriding default values to bool optionsRémi Verschelde
The `dev=yes` and `production=yes` options work as aliases to set a number of options, while still aiming to allow overriding specific options if the user wishes so. (E.g. `production=yes use_lto=no` should work to enable production defaults *but* disable LTO.) That wasn't working as `ARGUMENTS.get()` returns a string and not a boolean as expected by `BoolVariable`, and this wasn't flagged as a bug... So added a helper method using SCons' `BoolVariable._text2bool` to do the conversion manually.
2021-02-18SCons: Make freetype module a mandatory editor dependencyRémi Verschelde
Fixes #28650.
2021-02-08Merge pull request #43057 from Xrayez/custom_modules_recursiveRémi Verschelde
SCons: Add an option to detect C++ modules recursively
2021-02-03SCons: Add `production=yes` option to use production defaultsRémi Verschelde
This is meant for users making custom builds to match the options used on optimized, official builds. This enables, on the platforms which support them: - `use_static_cpp=yes` (portable binaries for Linux and Windows) - `use_lto=yes` (link time optimizations - note: requires a lot of RAM!) - `debug_symbols=no` (no debug symbols, smaller binaries) Also abort when using MSVC with `production=yes`, as: - It cannot optimize the GDScript VM like GCC or Clang do, leading to significant performance drops. - Its LTO support is unreliable, at least used to trigger crashes last we tried it extensively. All options can still be overridden if specified, and the `dev=yes` option was changed to also support overrides.
2021-02-01Fix incorrect version requirement in the SCons compilation DB commentHugo Locurcio
2020-12-17SCons: Fix build with `p` alias or platform auto-detectionRémi Verschelde
Fixes a pre-existing bug that #44433 exposed. It's pretty hacky, but we use `platform` in `env` both as an optional command line option (instead it can be autodetected, or passed via the `p` alias, and on Linux it might be overridden if you pass one of the convenience alias values), and as the reference value for what platform we're building on. Thus we override `env_base["platform"]` with the autodetected or validated platform, but any call to `opts.Update(env_base)` overrides it with the original command line option... causing e.g. #44448. The proper fix would be to refactor all this so that we don't reuse `env["platform"]` for platform detection (it could instead be e.g. `env.platform` as a member variable which holds the validated value), but for now I'm tapering over the immediate breakage. Fixes #44448 and other breakages induced by #44433.
2020-12-16SCons: Add only selected platform's opts to envRémi Verschelde
Otherwise we can get situations where platform-specific opts with the same name can override each other depending on the order at which platforms are parsed, as was the case with `use_static_cpp` in Linux/Windows. Fixes #44304. This also has the added benefit that the `scons --help` output will now only include the options which are relevant for the selected (or detected) platform.
2020-12-12Don't handle BaseException in build scriptsMarcel Admiraal
2020-11-26[Complex Text Layouts] Add third-party TextServer dependencies (ICU, ↵bruvzg
HarfBuzz, Graphite).
2020-11-25Core: Always enable ptrcall, remove PTRCALL_ENABLED defineRémi Verschelde
ptrcall is now also used to optimize calls in GDScript, on top of the existing use by the GDNative and Mono modules. It no longer makes sense to make it optional.
2020-10-24SCons: Add an option to detect C++ modules recursivelyAndrii Doroshenko (Xrayez)
This adds `custom_modules_recursive` which allows to detect and collect all nested C++ modules which may reside in any directory specified by `custom_modules` option. The detection logic is made to be more strict because `SCSub` may be used for organizing hierarchical builds within a module itself, so the existence of `register_types.h` and `config.py` is checked as well (these are all required for a C++ module to be compiled by Godot). For performance reasons, built-in modules are not checked recursively, and there's no benefit of doing so in the first place. It's now possible to specify a directory path pointing to a *single* module, as it may contain nested modules which are detected recursively.
2020-10-08SCons: Refactor and cleanup warnings definitionRémi Verschelde
2020-09-27Add all headers to VS ProjectBartłomiej T. Listwon
2020-09-10Remove unused Python imports.Marcel Admiraal
2020-08-13Merge pull request #41219 from akien-mga/gles2-takes-holidaysRémi Verschelde
Remove obsolete GLES2 backend code
2020-08-13Remove obsolete GLES2 backend codeRémi Verschelde
This code currently isn't compiled (and cannot compile). We plan to re-add OpenGL ES-based renderer(s) in Godot 4.0 alongside Vulkan (probably ES 3.0, possibly also a low-end ES 2.0), but the code will be quite different so it's not relevant to keep this old Godot 3.2 code. The `drivers/gles2` code from the `3.2` branch can be used as a reference for a potential new implementation.
2020-08-12update to use scons compile db toolGordon MacPherson
2020-07-28SCons: Refactor running commands through buildersAndrii Doroshenko (Xrayez)
A new `env.Run` method is added which allows to control the verbosity of builders output automatically depending on whether the "verbose" option is set. It also allows to optionally run any SCons commands in a subprocess using the existing `run_in_subprocess` method, unifying the interface. `Action` objects wrap all builder functions to include a short build message associated with any action. Notably, this removes quite verbose output generated by `make_doc_header` and `make_editor_icons_action` builders.
2020-07-26CI: Install master version of psf/blackRémi Verschelde
Until https://github.com/psf/black/pull/1328 makes it in a stable release, we have to use the latest from Git. Apply new style fixes done by latest black.
2020-07-26SCons: Build tests/ and main/ in cloned environmentsRémi Verschelde
Allows switching `tests=yes`/`no` and rebuilding only tests and main, instead of the whole engine. Co-authored-by: Andrii Doroshenko (Xrayez) <xrayez@gmail.com>