You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting `LLVM_VERSION` as an environment variable or a command-line argument to `make` will now inhibit LLVM version detection via `LLVM_CONFIG`. This is mainly to support cross-compilation from Linux to Windows MSVC, i.e. `make crystal target=x86_64-windows-msvc LLVM_VERSION=19.1.7` should now just work on WSL. It is also advisable to set the `LLVM_TARGETS` and `LLVM_LDFLAGS` environment variables, as implemented in #15091.
Using LLVM 17 or below will still fail if `LLVM_CONFIG` is not set, since the Makefiles have never supported cross-compiling `llvm_ext.o`, and that object file needs `llvm-config --cxxflags`.
A side benefit is that Crystal can now somewhat target future LLVM versions by simply doing something like `make LLVM_VERSION=21.0.0`, since it is only `find-llvm-config.sh` that imposes the version check.
$(error "Could not locate compatible llvm-config, make sure it is installed and in your PATH, or set LLVM_CONFIG. Compatible versions: $(shell cat src/llvm/ext/llvm-versions.txt)))\
$(error "Could not locate compatible llvm-config, make sure it is installed and in your PATH, or set LLVM_VERSION / LLVM_CONFIG. Compatible versions: $(shell cat src/llvm/ext/llvm-versions.txt)))\
$(error "Could not locate compatible llvm-config, make sure it is installed and in your PATH, or set LLVM_CONFIG. Compatible versions: $(shell type src\llvm\ext\llvm-versions.txt)))\
$(error "Could not locate compatible llvm-config, make sure it is installed and in your PATH, or set LLVM_VERSION / LLVM_CONFIG. Compatible versions: $(shell type src\llvm\ext\llvm-versions.txt)))\
0 commit comments