1

我正在尝试编译 llvm 2336.11。我将其配置为:

export CXX=/opt/local/bin/llvm-g++-4.2
export CC=/opt/local/bin/llvm-gcc-4.2
ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/mach/x86_64/ /usr/include/mach/x86_64
ln -s /usr/local/Cellar/binutils/2.23.1/x86_64-apple-darwin12.2.0/bin/ar /usr/bin/ar
ln -s /Applications/Xcode.app/Contents/Developer/usr/bin/ranlib /usr/bin/ranlib
ln -s /Applications/Xcode.app/Contents/Developer/usr/bin/nm /usr/bin/nm

../llvmgcc42-2336.11/llvmcore/configure --prefix=/Users/patrick.muscat/Documents/crosscompil/llvmbin/ --enable-assertions=no --enable-optimized=yes

但我明白了:

llvm[1]: Building Intrinsics.gen.tmp from Intrinsics.td
/Users/patrick.muscat/Documents/crosscompil/llvmbuild/Release-Asserts/bin/tblgen: ERROR: Couldn't find the `Intrinsic' class!
make[1]: *** [/Users/patrick.muscat/Documents/crosscompil/llvmbuild/lib/VMCore/Release-Asserts/Intrinsics.gen.tmp] Error 1
make[1]: Leaving directory `/Users/patrick.muscat/Documents/crosscompil/llvmbuild/lib/VMCore'
make: *** [all] Error 1

然后我修改了源以显示可用的定义和类,在 Record.cpp 中添加 Records.dump() 出现错误文本,我得到了这个(空):

------------- Classes -----------------
------------- Defs -----------------

有人有解释吗?

提前致谢

4

1 回答 1

0

最后我找到了解决方案。我安装了解决我的问题的 xcode 命令行工具。

我不太了解此安装的影响...Apple 文档有时很模糊...

于 2013-03-06T07:32:22.170 回答