Snippets

aokomoriuta clangを自力ビルドする

Created by aokomoriuta last modified
#!/bin/bash

# License:
#   You can select the license of your choice from as following:
#   * Creative Commons Attribution-ShareAlike 3.0 Unported http://creativecommons.org/licenses/by-sa/3.0/
#   * Creative Commons Attribution-Noncommercial 3.0 Unported http://creativecommons.org/licenses/by-nc/3.0/
#   * GNU General Public License v3.0 or later http://www.gnu.org/licenses/gpl.html
#   Author(attribution): aokomoriuta
# Usage:
#   $ cd /where/you/want/to/build
#   $ curl -L 'https://bitbucket.org/!api/2.0/snippets/aokomoriuta/KqEaE/master/files/clang.sh' | bash
# Documentation: https://qiita.com/aokomoriuta/items/4493514f232a4df70111

VERSION=llvmorg-14.0.1
REPO=https://github.com/llvm/llvm-project.git

ROOT=$(cd $(dirname $0) && pwd)
cd ${ROOT}

git clone https://github.com/llvm/llvm-project.git --depth=1 -b ${VERSION}
mkdir build
cd build
cmake ../llvm-project/llvm/ -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_PROJECTS="clang;lld;lldb;openmp;pstl" -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind;compiler-rt"
make -j16

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.