Use Clang to compile NSIS
We would like to drop GCC on Windows (#29318 (closed)), however we still have two projects that use it: Rust (#29320 (closed)) and NSIS.
NSIS can be mostly compiled with Clang (even though we need to manually link $arch-w64-mingw-gcc
and $arch-w64-mingw-g++
to $arch-w64-mingw-clang
and $arch-w64-mingw-clang++
, respectively).
The stopper is that NSIS contains 2 or 3 assembly files with some awkward/proprietary syntax, which are recognized neither by clang
, nor by GNU as
.
Mozilla uses the trick to ask Clang to use as
(with -fno-integrated-as
), but that doesn't work for us.
I haven't understood why, does Firefox contain another assembler? NASM does not count, because it uses Intel syntax, our files are in AT&T syntax.
In any case, see taskcluster/scripts/misc/build-mingw32-nsis.sh
for more information.
Anyway, I think we'll have to keep GCC for Rust at least until we switch to LLVM 15, so we may just keep GCC also for NSIS, and deal with it later.