clang++: error: argument unused during compilation: '-mwindows'

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By WiseGenius

I’m trying to build godot (for the first time) on Windows 10 using MinGW.

First, it complained:

Detected GCC 8 version < 8.4, which is not supported due to a regression in its C++17 guaranteed copy elision support. Use a newer GCC version, or Clang 6 or later by passing "use_llvm=yes" to the SCons command line.

I’m not planning to upgrade GCC just yet, so I tried to use Clang instead, since I have version 8.0.1 installed. But this is what I got:

C:\godot>scons use_llvm=yes platform=windows
scons: Reading SConscript files ...
Configuring for Windows: target=debug, bits=default
Using MinGW
YASM is necessary for WebM SIMD optimizations.
WebM SIMD optimizations are disabled. Check if your CPU architecture, CPU bits or platform are supported!
Checking for C header file mntent.h... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
[Initial build] e[94mCompiling e[95m==> e[93mplatform\windows\godot_windows.cppe[0m
b"clang++: error: argument unused during compilation: '-mwindows' [-Werror,-Wunused-command-line-argument]\r\n"
scons: *** [platform\windows\] Error 1
scons: building terminated because of errors.
:bust_in_silhouette: Reply From: nbnhunt

I had the same error compiling on my Raspberry Pi. The error tries to give you the anwer: ““use_llvm=yes” to the SCons command line.”. Add that to your command and see how it goes.

I still had more after that, though, before I got Godot on the Pi.