Support building the interpreter on Windows #12397
Merged
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.
This PR includes the final bits necessary to enable interpreter builds on Windows MSVC. Requires #12391. To set up:
ffi.lib
exists inCRYSTAL_LIBRARY_PATH
(it was added after 1.5.0, so you might have to build it yourself or grab it from the CI artifacts).CRYSTAL_LIBRARY_PATH
DLL directory withgc.dll
andpcre.dll
according to the first 3 steps here. Do not setCRYSTAL_LIBRARY_PATH
in the terminal that rebuilds the compiler.libiconv.dll
and theiconv.lib
import library:MultiThreaded
becomesMultiThreadedDLL
and/p:Configuration=ReleaseStatic
becomes/p:Configuration=Release
.lib64\libiconv.lib
toiconv.lib
inside the DLL directory.lib64\libiconv.dll
tolibiconv.dll
inside the DLL directory. Do not rename the DLL - the base name is hardcoded in the import library.make -fMakefile.win interpreter=1
.CRYSTAL_LIBRARY_PATH
to the DLL directory, and alsoset CRYSTAL_OPTS=-Dpreview_dll
. You will have to add-Dwithout_iconv
unless you did the optional steps above.bin\crystal i
should start an interpreter REPL session.set CRYSTAL_INTERPRETER_LOADER_INFO=1
also works on Windows.The main outstanding issues are tracked in #12396.