We would like to use Clang instead of GCC.
It seems to work (if you link gcc and g++ to clang and clang++, respectively), except for the assembly files.
Clang has a -fno-integrated-as option, but I still did not manage to use as from binutils, so I had to resort on GCC.
Only the System plug-in requires it so if you tell scons to skip that then at least you can build...
Sorry, meant to post to https://sourceforge.net/p/nsis/feature-requests/579/
Last edit: Milos Komarcevic 2024-05-30
Hi, eventually I managed to solve my assembler problems by adding GNU binutils to
$PATH.Plus there are a couple of changes to do before being able to build with Clang:
these lines come from Firefox's source code, check
build-mingw32-nsis.shthere.Currently, for Tor Browser, Mullvad Browser and Ricochet Refresh (they share part of the build system) we use Clang to build NSIS.
For aarch64 you will have to disable the system plugin, though, or reimplement the assembly module for aarch64.
The MSYS2 team took a slightly different approach that builds on x86_64 only so far: https://github.com/msys2/MINGW-packages/pull/21003
Right, x86_64 needs some changes also for the GNU toolchain.
Let me link our full build script: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/blob/main/projects/nsis/build
Stuff between
[% %]are template tags that won't be in the final script, but the file should be understandable otherwise.