mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-18 00:58:31 +00:00
scripts/build: add clang targets
With this, one can do a CRUI build via QEMU+Docker using clang as a compiler, for example: make -C scripts/build alpine-clang make -C scripts/build ppc64le-clang For alpine, default clang version is used. For others, a version has to be specified explicitly, as there is no package called "clang" in Ubuntu Trusty (which is used as a base for most arches). Since clang-3.8 appears to be available from Trusty, and this is the current stable version of clang, let's use it. travis-ci: success for QEMU+Dockerfile improvements + clang build Signed-off-by: Kir Kolyshkin <kir@openvz.org> Acked-by: Andrei Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
3541b0d8f9
commit
1ccc94ffc5
3 changed files with 20 additions and 6 deletions
|
|
@ -1,4 +1,5 @@
|
|||
FROM alpine:3.4
|
||||
ARG CC=gcc
|
||||
RUN apk update && apk add \
|
||||
build-base \
|
||||
coreutils \
|
||||
|
|
@ -9,7 +10,8 @@ RUN apk update && apk add \
|
|||
libaio-dev \
|
||||
libcap-dev \
|
||||
libnl3-dev \
|
||||
pkgconfig
|
||||
pkgconfig \
|
||||
$CC
|
||||
COPY . /criu
|
||||
WORKDIR /criu
|
||||
RUN make mrproper && make -j $(nproc)
|
||||
RUN make mrproper && make -j $(nproc) CC=$CC
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
ARG CC=gcc
|
||||
|
||||
RUN apt-get clean
|
||||
|
||||
RUN apt-get update
|
||||
|
|
@ -16,11 +18,12 @@ RUN apt-get install -y \
|
|||
libnl-3-dev \
|
||||
libselinux-dev \
|
||||
pkg-config \
|
||||
git-core
|
||||
git-core \
|
||||
$CC
|
||||
|
||||
COPY . /criu
|
||||
WORKDIR /criu
|
||||
|
||||
RUN make mrproper && make -j $(nproc)
|
||||
RUN make mrproper && make -j $(nproc) CC=$CC
|
||||
RUN make mrproper
|
||||
RUN bash -c 'CLEAN="$(git clean -ndx --exclude=scripts/build)"; echo "${CLEAN}"; test -z "${CLEAN}"; exit $?'
|
||||
|
|
|
|||
|
|
@ -12,10 +12,19 @@ binfmt_misc:
|
|||
.PHONY: binfmt_misc
|
||||
|
||||
alpine:
|
||||
docker build -t criu-$@ -f Dockerfile.alpine ../..
|
||||
docker build -t criu-$@ -f Dockerfile.alpine $(DB_ARGS) ../..
|
||||
|
||||
%: Dockerfile.% qemu-user-static binfmt_misc
|
||||
docker build -t criu-$@ -f $< ../..
|
||||
docker build -t criu-$@ -f $< $(DB_ARGS) ../..
|
||||
|
||||
%-clang: DB_ARGS=--build-arg CC=clang-3.8
|
||||
alpine-clang: DB_ARGS=--build-arg CC=clang
|
||||
alpine-clang: alpine
|
||||
armv7hf-clang: armv7hf
|
||||
aarch64-clang: aarch64
|
||||
ppc64le-clang: ppc64le
|
||||
x86_64-clang: x86_64
|
||||
.PHONY: alpine-clang armv7hf-clang aarch64-clang ppc64le-clang x86_64-clang
|
||||
|
||||
clean:
|
||||
rm -rf qemu-user-static
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue