MacOS 安装 LLVM

MacOS installation LLVM

我是 llvm 的新手,但遇到了问题。我已经用命令 brew install llvm

安装了它

在我这样做之后 echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.bash_profile

在此之后,我写了 hello world 示例,它位于 /Documents/llvm_exmaple/helloworld.ll 和这个 .ll 中,当我输入 lli helloworld.ll 时,我得到了类似 -bash: lli: command not found 的消息。

我应该写什么才能让它发挥作用?顺便说一句,其他命令也不起作用。请帮助我。

我在这个命令后得到它 echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.bash_profile 你应该写这个 source ~/.bash_profile 然后一切都会正常工作