first time meet llvm
NOTE: PLEASE USE SSD!!!!!
NOTE: PLEASE USE SSD!!!!!
NOTE: PLEASE USE SSD!!!!!
Before start:
To build llvm, we use:
- Windows 10
- visual studio 2019
- a more than 200GB free space SSD
And MSVC uses system code page identifiers to encode source, while llvm source is saved with encodeing UTF-8. If they do not match, it will have some errors while compiling. We can set UTF-8 as default character encoding in windows:
- open control panel, Region->Administrative->Change system locale
- check off "Bate: Use Unicode UTF-8 for worldwide language support"
Get llvm:
git clone https://github.com/llvm/llvm-project.git
cd llvm-project
mkdir build
cd build
Generate Visual Studio solution:
cmake -G "Visual Studio 16 2019" -A x64 -DLLVM_ENABLE_PROJECTS='clang; clang-tools-extra; libcxx; libcxxabi; libunwind; lldb; compiler-rt; lld; polly; debuginfo-tests' ../llvm
then open LLVM.sln and build the solution.
Tips:
- You can set Options -> Projects and Solutions -> Build and run -> maximum number of parallel project builds to half of you processes to limit memory using;
- After you run the building, you can go to bed and sleep;
0 条评论