- Dlang https://dlang.org/
- LLVM 13 http://llvm.org/
LLVM .lib files are required (statically compiled).
Required software: python 3, cmake, visual studio
-
Download the source from the LLVM website to c:\temp\llvm
-
create a 'build' directory eg. c:\temp\llvm\build
-
Use a command prompt with visual studio vars setup
-
Edit CMakeLists.txt:
- Change LLVM_TARGETS_TO_BUILD from "all" to X86 (Unless you need other targets)
-
cd \temp\llvm\build
-
cmake -G "Visual Studio 16 2019" -A x64 c:\temp\llvm
-
Open the Visual Studio .sln file in the build directory
-
Set to Release build
-
Add code:
- Libraries/LLVMCore/Core.cpp
extern "C" { void LLVMSetFastMath(LLVMBuilderRef Builder, bool fast = true) { auto fmf = FastMathFlags(); fmf.setFast(fast); unwrap(Builder)->setFastMathFlags(fmf); } }
-
Set everything to C/C++/Code Generation/Runtime Library = /MT (static multithreaded)
Ignore these files:
-
Examples/Kaleidoscope
-
Loadable Modules/*
-
Misc/*
-
Tablegenning/*
-
Tests/check
-
Tests/check-lit
-
Tests/check-llvm
-
Tests/llvm-test-depends
-
Tests/prepare-check-lit
-
Tests/test-depends
-
Tests/TestPlugin
-
Tests/UnitTests
-
Tools/llvm-addr2line
-
Tools/llvm-bitcode-strip
-
Tools/llvm-dlltool
-
Tools/llvm-install-name-tool
-
Tools/llvm-lib
-
Tools/llvm-locstats
-
Tools/llvm-otool
-
Tools/llvm-ranlib
-
Tools/llvm-readelf
-
Tools/llvm-strip
-
Tools/llvm-windres
-
Utils/LLVMVisualizers
-
-
Rebuild ALL-BUILD
-
Copy the lib files from build\Release\lib to somwehere safe and point to them in the dub.sdl file (lflags).