Last active
May 3, 2023 10:39
-
-
Save TUGOhost/62e0946db0c7dd132376bc107a36f50d to your computer and use it in GitHub Desktop.
LLVM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows10下编译LLVM与Clang | |
1、下载安装CMake | |
2、下载安装Visual studio,按照C++ Desktop开发进行下载相关配置 | |
3、下载llvm与clang对应的版本到本地,整体目录如下: | |
Mode LastWriteTime Length Name | |
---- ------------- ------ ---- | |
d---- 2023/3/20 13:55 clang | |
d---- 2023/3/20 13:55 llvm-5.0.2.src | |
4、命令行下:运行 | |
>mkdir build && cmake.exe -S .\llvm-5.0.2.src\ -B .\build\ -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=X86 -Thost=x64 | |
其中clang为clang源码的文件目录名 | |
这会在build目录下生成LLVM.sln,点击这个sln文件,或者visual sutdio选择打开这个sln文件,会将clang和llvm项目加载到visual studio中 | |
5、visual studio中选择编译模式为release,只运行不调试。等待编译完成。 | |
参考:https://qiu-weidong.github.io/2022/05/01/llvm/build/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment