尝试在内生代建立llvmcore时出现问题

时间:2013-03-05 13:31:14

标签: llvm

我正在尝试编译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 -----------------

有人有解释吗?

提前致谢

1 个答案:

答案 0 :(得分:0)

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

我不太了解这个安装的影响......有时候Apple文档很有用......