12 Commits

Author SHA1 Message Date
Pāvels Nadtočajevs
f66b541698 Fix ARM64 build. 2025-12-15 15:10:38 +02:00
Skyth
1bdec2ab6a Upgrade Mesa version to 25.3.1. 2025-12-09 17:28:17 +03:00
Skyth
eb3eef2b98 Add NDEBUG & disable DXIL optimizations. 2025-10-31 23:05:17 +03:00
Pāvels Nadtočajevs
f4466616e6 Update CI images to windows-2022 2025-10-31 21:43:02 +02:00
Kusok
232dda2a37 Add missing imports, remove wildcard and unused imports 2024-07-16 16:53:40 +08:00
Pedro J. Estébanez
d61034bda2 Add use_asan build option 2024-06-14 14:03:34 +02:00
bruvzg
9557f078cd [MinGW] Disable exceptions. 2024-01-30 19:13:32 +02:00
Andreia Gaita
938501d717 Allow setting additional defines and an extra suffix from the command line
We need to do some builds with additional defines for Xbox because the
dxil validator code uses a different DLL name depending on the active
defines. It's not really worth adding a whole new platform for this,
everything else is just the normal Windows build, so this PR just adds
the ability to pass in additional defines from the CLI, and an option
to set an additional suffix to the binary, so we can tell builds apart.
2024-01-10 13:53:55 +01:00
Michael Anghelone
149bcf6cff Modifications to get compiled in msys2 on arm64
These modifications make it possible to compile within a msys2
clangarm64 environment.

Command used to build:
```
    scons use_mingw=True use_llvm=True arch=arm64
```

The patch file prevents this error from occurring:
```
    gcc -o godot-mesa/src/microsoft/compiler/nir_to_dxil.windows.arm64.o -c -std=c11 -O3 -DMINGW_ENABLED -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 -D__MSVCRT_VERSION__=1792 -DHAVE_STRUCT_TIMESPEC -DWINDOWS_NO_FUTEX -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DPACKAGE_VERSION=\"23.1.0-devel\" -DPACKAGE_BUGREPORT=\"https://gitlab.freedesktop.org/mesa/mesa/-/issues\" -DPIPE_SUBSYSTEM_WINDOWS_USER -D_USE_MATH_DEFINES -DHAVE_TIMESPEC_GET -DHAVE_STRUCT_TIMESPEC -D_UCRT -Igodot-mesa -Igodot-mesa/bin -Igodot-mesa/include -Igodot-mesa/include/GL -Igodot-mesa/include/GLES -Igodot-mesa/include/GLES2 -Igodot-mesa/include/GLES3 -Igodot-mesa/include/KHR -Igodot-mesa/src -Igodot-mesa/src/c11/impl -Igodot-mesa/src/compiler -Igodot-mesa/src/compiler/glsl -Igodot-mesa/src/compiler/nir -Igodot-mesa/src/compiler/nir/__pycache__ -Igodot-mesa/src/compiler/spirv -Igodot-mesa/src/gallium -Igodot-mesa/src/gallium/include -Igodot-mesa/src/gallium/include/pipe -Igodot-mesa/src/mesa -Igodot-mesa/src/mesa/main -Igodot-mesa/src/mesa/program -Igodot-mesa/src/microsoft -Igodot-mesa/src/microsoft/compiler -Igodot-mesa/src/microsoft/spirv_to_dxil -Igodot-mesa/src/util -Igodot-mesa/src/util/format -Igodot-mesa/src/util/format/__pycache__ -Igodot-mesa/src/util/sha1 -Igodot-mesa/src/vulkan -Igodot-mesa/src/vulkan/runtime -Igodot-mesa/src/vulkan/util -Igodot-mesa/generated/src -Igodot-mesa/generated/src/compiler -Igodot-mesa/generated/src/compiler/nir -Igodot-mesa/generated/src/compiler/nir -Igodot-mesa/generated/src/compiler/nir -Igodot-mesa/generated/src/compiler/nir -Igodot-mesa/generated/src/compiler/spirv -Igodot-mesa/generated/src/util/format -I. -Ivulkan/include godot-mesa/src/microsoft/compiler/nir_to_dxil.c
    =====
    godot-mesa/src/microsoft/compiler/nir_to_dxil.c:5087:7: error: expected expression
     5087 |       const struct dxil_value* value = get_src(ctx, &intr->src[0], 0, nir_type_uint);
          |       ^
    godot-mesa/src/microsoft/compiler/nir_to_dxil.c:5088:45: error: use of undeclared identifier 'value'
     5088 |       store_dest_value(ctx, &intr->dest, 0, value);
          |                                             ^
    2 errors generated.

    =====
    scons: *** [godot-mesa/src/microsoft/compiler/nir_to_dxil.windows.arm64.o] Error 1
    scons: building terminated because of errors.
```

With these change I am able to build on a Surface Pro X without any
issues.

Afterwords compiling godot itself looks like this:
```
$ scons  mingw_prefix=/clangarm64 LINKFLAGS="-lpng -lembree3.dll -L/clangarm64/lib/" CCFLAGS='-I/clangarm64/include/-v' CC=aarch64-w64-mingw32-gcc CXX=aarch64-w64-mingw32-g++ platform=windows builtin_embree=False builtin_libpng=False d3d12=True mesa_libs=<path to godot-nir-static> dxc_path=<path to dxc> opengl3=False vulkan=False use_volk=False
```

embree, and libpng included in the repo proved to be difficult to
compile with. I opted to use the pre compiled versions available through
my package manager.

This was a fun challenge, and I hope it is found to be useful.

PS this only worked on the current master of Godot (v4.3.dev.custom_build [13a0d6e9b]),
the 4.2 branch would not compile.
2024-01-05 16:40:23 -05:00
bruvzg
d1ca231620 [MinGW] Rename conflicting file, add missing timespec function implementation. 2023-12-14 11:07:37 +02:00
bruvzg
3416580362 Add MinGW build support. 2023-09-30 17:57:35 +03:00
bruvzg
abdb8282ae Initial commit. 2023-09-29 14:11:30 +03:00