LLVM官网:The LLVM Compiler Infrastructure Project
下载地址:Release LLVM 21.1.0 · llvm/llvm-project · GitHub
清华源下载地址:https://mirrors.tuna.tsinghua.edu.cn/github-release/llvm/llvm-project/LatestRelease/
下载安装文件安装
首先下载安装资料,比如LLVM-21.1.1-win64.exe
下载后双击运行。但是我安装的时候碰到了报错,见后面调试部分,没有解决问题。
下载压缩包安装
下载这个压缩包:clang+llvm-21.1.1-x86_64-pc-windows-msvc.tar.xz
下载后解压,随后在系统路径里加上就行了。
或者每次用的时候加上路径,比如路径为:>E:\360Downloads\clang+llvm-21.1.1-x86_64-pc-windows-msvc\bin
那么执行lli命令为:
E:\work\arc>E:\360Downloads\clang+llvm-21.1.1-x86_64-pc-windows-msvc\bin\lli -h
OVERVIEW: llvm interpreter & dynamic compiler
USAGE: lli.exe [options] ...
OPTIONS:
Color Options:
--color - Use colors in output (default=autodetect)
General options:
-O - Optimization level. [-O0, -O1, -O2, or -O3] (default = '-O2')
--abort-on-max-devirt-iterations-reached - Abort when the max iterations for devirtualization CGSCC repeat pass is reached
--addrsig - Emit an address-significance table
--align-loops= - Default alignment for loops
--allow-ginsert-as-artifact - Allow G_INSERT to be considered an artifact. Hack around AMDGPU test infinite loops.
--arc-contract-use-objc-claim-rv - Enable generation of calls to objc_claimAutoreleasedReturnValue
--asm-show-inst - Emit internal instruction representation to assembly file
调试
安装的时候报错
可能资料损坏吧,这是从清华源下载的,换用压缩包。