标签:str mpi color project 地址 http for form config
clang的下载地址
http://releases.llvm.org/download.html
下载好了以后,四个压缩包都解压出来,得到四个目录:
llvm-3.3.src
cfe-3.3.src
clang-tools-extra-3.3.src
compiler-rt-3.3.src
libcxx-3.3.src
然后按下面的步骤组织:
1 mv cfe-3.3.src clang 2 3 4 mv clang/ llvm-3.3.src/tools/ 5 6 7 8 mv clang-tools-extra-3.3.src extra 9 10 11 mv extra/ llvm-3.3.src/tools/clang/ 12 13 14 15 mv compiler-rt-3.3.src compiler-rt 16 17 18 mv compiler-rt llvm-3.3.src/projects/
这样以后clang,clang-tools-extra和compiler-rt就可以和llvm一起编译了。
在llvm-3.3.src同一层目录上新建个目录build-3.3并进入:
Clang7.0.0版本需要采用cmake 进行编译
llvm为了防止编译的中间结果分布在码源目录中,影响码源的结构。因此不支持目录内编译。需要在码源目录外创建额外的编译目录。
1 mkdir build7.0.0 2 cd build7.0.0 3 cmake -G "Unix Makefiles" ../llvm-7.0.0.src 4 make make install
执行cmake命令后的成功打印信息:
1 -- Builtin supported architectures: x86_64 2 -- Looking for sys/resource.h 3 -- Looking for sys/resource.h - found 4 -- Clang version: 7.0.0 5 -- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG 6 -- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG - Failed 7 -- Configuring done 8 -- Generating done 9 -- Build files have been written to: /home/sl/prog/install/build-7.0.0
make -j4 // 进行编译,时间有点久
make install //
参考链接:
https://www.cnblogs.com/davytitan/p/3924402.html
https://blog.csdn.net/c_sdnq2451q/article/details/46999119
标签:str mpi color project 地址 http for form config
原文地址:https://www.cnblogs.com/alog9/p/11793028.html