如何构建clang+;具有非系统gcc的LLVM
我正在尝试切换到如何构建clang+;具有非系统gcc的LLVM,gcc,clang,llvm,Gcc,Clang,Llvm,我正在尝试切换到/usr/local/bin/gcc中的gcc47+设置。默认系统gcc是/usr/bin/gcc中的4.4.6 类似的头文件: /usr/include/c++/4.4.4/bits/stl\u pair.h /usr/local/include/c++/4.7.1/bits/stl_pair.h locate exception_ptr.h /usr/include/c++/4.4.4/exception_ptr.h /usr/local/include/c++/4.7.1/
/usr/local/bin/gcc
中的gcc47+设置。默认系统gcc是/usr/bin/gcc
中的4.4.6
类似的头文件:
/usr/include/c++/4.4.4/bits/stl\u pair.h
/usr/local/include/c++/4.7.1/bits/stl_pair.h
locate exception_ptr.h
/usr/include/c++/4.4.4/exception_ptr.h
/usr/local/include/c++/4.7.1/bits/exception_ptr.h
我试图用cd/apps/llvmbuild构建llvm-clang/apps/llvm/configure--prefix=/apps/llvmbuild--enable-optimized--enable-cxx11--enable docs=no--enable targets=host only--disable断言CPPFLAGS=-I/usr/local/include/cxflags=-I/usr/local/include/
然后
cd/apps/llvmbuild;make-j12 ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1
<>但是我发现了错误,显示它正在搜索4.4.6目录中的C++文件:
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../../../include/c++/4.4.6/exception_ptr.h
locate exception_ptr.h
/usr/include/c++/4.4.4/exception_ptr.h
/usr/local/include/c++/4.7.1/bits/exception_ptr.h
使用CC和CXX环境变量。 有关信息,请参见
configure--help
:
Some influential environment variables:
CC C compiler command
...
CXX C++ compiler command
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
大概是这样的:
CXX=/usr/local/bin/g++ CC=/usr/local/bin/gcc /apps/llvm/configure --your --other --options