Skip to content

Instantly share code, notes, and snippets.

@yagop yagop/
Last active May 8, 2018

What would you like to do?
Compile clang-format on Ubuntu Xenial Docker
docker run -w /root -it ubuntu:xenial-20180417 /bin/bash
apt update
apt install curl xz-utils cmake ninja-build g++ python -y
curl -o llvm-6.0.0.src.tar.xz
tar xvf llvm-6.0.0.src.tar.xz
cd llvm-6.0.0.src/tools/
curl -o cfe-6.0.0.src.tar.xz
tar xvf cfe-6.0.0.src.tar.xz
mv cfe-6.0.0.src clang
cd ..
mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_STATIC=true ..
ninja clang-format
# After building
docker cp <DOCKER_ID>:/root/llvm-6.0.0.src/build/bin/clang-format /tmp
cp clang-format /usr/local/bin/clang-format
fpm --rpm-autoprov -n clang-format-static -v 6.0.0.el7 -t rpm -s dir /usr/local/bin/clang-format
This file has been truncated, but you can view the full file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.