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.
Resolves part of #6170.
llvm-config
instead ofllvm_VERSION
for thex86_64-windows-gnu
target. Also invokes thefind-llvm-config
script usingsh
explicitly and ensures the script returns a Windows path. (This pretty much means a MinGW-w64-based compiler will require the entire MSYS2 environment to work.)Makefile
and thebin/crystal
script now recognize.build/crystal.exe
as the local compiler under MSYS2..build/crystal.exe
already exists and we are on Windows,Makefile
now builds a temporary executable first, just like inMakefile.win
.Makefile
doesn't interpret backslashes inllvm-config.exe
's path as escape sequences.install_dlls
target for installing the compiler's dependent DLLs to the given prefix'sbin
directory. This is only needed if the installation is to be distributed outside MSYS2.lld
which can be installed using themingw-w64-ucrt-x86_64-lld
package.With this patch, cross-compiling from MSVC-based Crystal will no longer work until #15091 is merged. Instead it can be done from Linux, including WSL, assuming the host and target LLVM versions are identical (right now MSYS2 has 18.1.8):