llvm-mingw-w64 21.1.8 (new formula) #259439
Open
+350
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where<formula>is the name of the formula you're submitting?brew test <formula>, where<formula>is the name of the formula you're submitting?brew audit --strict <formula>(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it passbrew audit --new <formula>?Add a formula for llvm-mingw-w64, providing cross-compilers targeting Windows on ARM64, ARM64EC, i686, and x86_64.
This is the combination of LLVM's compiler/linker (from the installed
lldandllvm), LLVM's compiler-rt/libc++, and mingw-w64's headers/libraries/tools.As such there isn't really a single upstream project that this represents. Martin Storsjö's llvm-mingw pioneered this combination and provides self-contained binaries for various platforms. I also used Gentoo's
llvm-mingw64ebuild as a reference, since it similarly uses an existing LLVM.I decided to use LLVM's version number, since this formula needs to stay in-sync with the
llvmformula (and is added tosynced_versions_formulae.json).This formula unfortunately conflicts with
mingw-w64, since they both provide{i686,x86_64}-w64-mingw32-{addr2line,ar,as,dlltool,ld,nm,objcopy,objdump,ranlib,readelf,size,strings,strip,widl,winres}binaries. This formula should be a drop-in replacement formingw-w64(as much as LLVM is a drop-in replacement for GCC), just specifyCC={arch}-w64-mingw32-clanginstead of-gcc. It may also be necessary to specifyLD={arch}-w64-mingw32-ld, unfortunatelyclang -print-prog-name=ldalways returns/usr/bin/ld(regardless of-targetor-fuse-ld=lld) and this may confuse autoconf.I have tested this by building FEX and vkd3d, but it's very possible that building other packages will shake out more bugs.