Commit Graph

577 Commits

Author SHA1 Message Date
1fbc0c5631 [Buildsystem] Add EnumVariable(ignorecase=2) 2025-04-29 13:35:40 -04:00
2242bf9b3d Merge pull request #105697 from akien-mga/scons-x86_32-mfpmath-sse
SCons: Explicitly enable `-mfpmath=sse -mstackrealign` for x86_32
2025-04-28 10:01:31 -05:00
dc9c34f0c6 SCons: Add enum conversion warning 2025-04-26 12:06:20 -05:00
007717faf9 SCons: Remove check_c_headers
• Can instead check for headers directly with `__has_include`, a C++17 feature
2025-04-25 11:30:39 -05:00
08fa148310 SCons: Explicitly enable -mfpmath=sse -mstackrealign for x86_32
Passing `-msse2` doesn't seem to be sufficient to opt into SSE floating point math
instead of the less stable x87.

`-mstackrealign` also seems necessary when using SSE on x86_32.
2025-04-24 12:36:29 +02:00
f6efd88cda Add {c,cpp}_compiler_launcher options 2025-04-17 12:27:44 -04:00
4310cb82b8 AccessKit integration for macOS, Linux, and Windows. 2025-04-08 20:25:47 +03:00
01f0bd36a4 SCons: Integrate WARNLEVEL & OPTIMIZELEVEL 2025-04-03 18:10:29 -05:00
2800948d61 Organize ifdefs for disabling navigation, physics, and XR 2025-04-02 08:24:24 -07:00
1f56d96cf2 Merge pull request #104893 from Repiteo/scons/external-includes-alt
SCons: Add `CPPEXTPATH` for external includes
2025-04-02 07:48:03 -05:00
f25fc34439 SCons: Add CPPEXTPATH for external includes 2025-04-02 07:29:08 -05:00
556933306a Allow to compile templates without navigation features 2025-04-01 11:53:35 -03:00
a2f200c5d6 SCons: Only set GCC -Wvirtual-inheritance for C++ and warnings=extra 2025-03-31 23:46:42 +02:00
5ad414d046 Allow to compile templates without physics servers 2025-03-28 11:00:44 -03:00
3886fd1422 Merge pull request #104617 from Repiteo/scons/color-refactor
SCons: Refactor `color.py`
2025-03-28 14:33:19 +01:00
dd9dc75a83 Optimize Object::cast_to by assuming no virtual and multiple inheritance, gaining 8x throughput over dynamic_cast.
Add `-Wvirtual-inheritance` to compiler warnings as a sanity check.
2025-03-27 15:39:53 +01:00
2b1f463de5 SCons: Refactor color.py 2025-03-25 12:27:35 -05:00
b6e947ddba Merge pull request #104148 from YeldhamDev/scons_move_env_checks
Make SConstruct file check some envs before querying modules
2025-03-18 14:42:46 -05:00
b28d6d1fa3 Don't inline certain functions for smaller binary size.
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>
2025-03-18 21:40:25 +08:00
10ed66f28c SCons: Add emitter to declutter build objects 2025-03-15 12:08:24 -05:00
f1304a3dfb Make SConstruct file check some envs before querying modules 2025-03-14 17:38:28 -03:00
be429eb404 SCons: Make builders prettier, utilize constexpr 2025-03-11 18:31:20 -05:00
67d4a245d8 Merge pull request #103267 from YeldhamDev/reality_got_too_extended
Allow to compile the engine without XR support
2025-03-07 15:12:54 -06:00
2949ab0707 SCons: Implement minor fixes 2025-03-01 08:53:53 -06:00
aea559b39a Allow to compile the engine without XR support 2025-02-25 17:07:21 -03:00
382c760ea6 SCons: Apply new ruff/mypy fixes 2025-02-03 09:55:09 -06:00
90208f7dd4 SCons: Fix handling of platform-specific tools, notably mingw
Add optional `detect.py` `get_tools` method to let platforms register SCons
tools they need.

This helps move this logic out of SConstruct, keeping platforms more self
contained, and helping thirdparty platforms define their own custom tools.

This logic was also unreliable (the `use_mingw` one would only work if
passed manually on the command line, not in e.g. `get_flags`).

Co-authored-by: Thaddeus Crews <repiteo@outlook.com>
2025-01-25 13:59:30 +01:00
73278bf35d SCons: Properly NoCache all text files 2025-01-16 16:59:12 -06:00
76c8e76560 Merge pull request #101284 from akx/tyops
A handful of typo fixes
2025-01-08 15:53:33 +01:00
f134769506 Fix various typos
* Add TODO notes for typos that should be fixed for 5.0

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-01-08 14:47:42 +02:00
a29294fddc SCons: Refactor color output implementation 2025-01-07 18:44:53 -06:00
34d8255947 Force build editor with regex module, remove checking code.
Fix include.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-01-07 19:43:23 +08:00
182b4741ea Merge pull request #93479 from Repiteo/scons/better-colored-output
SCons: Improve colored output
2024-12-17 16:18:41 +01:00
f86b3696f6 SCons: Properly set SSE2 as baseline on x86_32
Setting it only for release templates on Windows and macOS was inconsistent,
and Jolt requires it as a minimum.

Drop the `-mxsave` flag from the raycast module, this doesn't seem to be
used explicitly by Embree, and unnecessarily makes our config and baseline
muddy.
2024-12-12 22:44:44 +01:00
800076a6c2 [Windows] Use dwarf-4 for clang builds on Windows. 2024-12-11 14:10:57 +02:00
deb4c00f06 Merge pull request #100210 from hpvb/scons-use-md5-timestamp
SCons: Unconditionally use `env.Decider("MD5-timestamp")`
2024-12-10 14:16:08 -06:00
3cb8419703 Merge pull request #100207 from bruvzg/mingw_dbg
[Windows] Fix MinGW debug symbols.
2024-12-10 14:16:06 -06:00
d8761f2c79 SCons: Improve colored output 2024-12-10 11:44:48 -06:00
04fff3fe0d Unconditionally use env.Decider("MD5-timestamp")
It seems that we are only enabling this option together with unsafe
build determinators. However it seems that MD5-timestamp by itself is
not unsafe.

MD5-Timestamp works by first checking the timestamp of a file, comparing
it to the scons database and if it does not match it will do an md5sum
to determine if the file needs rebuilding.

Without this option SCons will always create md5sums of every file. In
the case of a null build this is 50% of the time.
2024-12-10 03:40:17 +01:00
070aeb5688 SCons: Fix MSVC bypassing disabled warnings 2024-12-09 11:49:42 -06:00
404383e161 [Windows] Fix MinGW debug symbols. 2024-12-09 18:54:07 +02:00
797c8bd85f Merge pull request #99351 from dustdfg/scons_android_refactor
SCons: Move `swappy` option to android and slightly refactor `detect.py`
2024-11-21 17:56:59 -06:00
0896bdd7bc SCons: Misc improvements
* Delete old gcc 7 check
* Use f-strings where it is easy
* Use AddVariables instead of Add for collections of options

Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
2024-11-20 18:18:12 +02:00
6467beb75d SCons: Move swappy option to android and slightly refactor detect.py
Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
2024-11-20 12:48:18 +02:00
1250681a4f SCons: pass ninja_file variable in tool instead of default name
Noticed that when I run with `ninja_file` it wasn't created even
though in terminal I saw that the file will be generated

Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
2024-11-18 13:25:47 +02:00
6c9337de36 Merge pull request #99217 from dustdfg/refactor_compiler_min_detection
Buildsystem: Refactor compiler detection code
2024-11-15 10:42:42 -06:00
0e4a4e3c4d SCons: Improve cache purging logic
• Implement caching via SCons arguments, rather than environment variables
2024-11-15 08:29:58 -06:00
d55ed0cb15 Buildsystem: Refactor compiler detection code
* Delete old check for gcc 8 as we support 9 or higher
* Flatten branches for clang and apple clang
* Renamed is_vanilla_clang to is_apple_clang to be more clear

Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
2024-11-15 12:59:46 +02:00
ce0709ecf5 Merge pull request #99046 from dustdfg/unify_platform_aliases
Buildsystem: Unify compatibility aliases
2024-11-13 08:34:32 -06:00
49023c0f7d Merge pull request #99138 from dustdfg/remove_old_vs_proj_code
Delete old unused code for VS project generation
2024-11-13 08:34:13 -06:00