xref: /openbmc/qemu/tests/docker/test-clang (revision 9e5ef164)
1c8908570SFam Zheng#!/bin/bash -e
2c8908570SFam Zheng#
3c8908570SFam Zheng# Compile and check with clang.
4c8908570SFam Zheng#
5c8908570SFam Zheng# Copyright (c) 2016 Red Hat Inc.
6c8908570SFam Zheng#
7c8908570SFam Zheng# Authors:
8c8908570SFam Zheng#  Fam Zheng <famz@redhat.com>
9c8908570SFam Zheng#
10c8908570SFam Zheng# This work is licensed under the terms of the GNU GPL, version 2
11c8908570SFam Zheng# or (at your option) any later version. See the COPYING file in
12c8908570SFam Zheng# the top-level directory.
13c8908570SFam Zheng
14c8908570SFam Zheng. common.rc
15c8908570SFam Zheng
16c8908570SFam Zhengrequires clang
17c8908570SFam Zheng
18c16fe84fSFam Zhengcd "$BUILD_DIR"
19c16fe84fSFam Zheng
20*9e5ef164SPaolo BonziniOPTS="--cxx=clang++ --cc=clang --host-cc=clang"
21*9e5ef164SPaolo BonziniOPTS="$OPTS --extra-cflags=-fsanitize=undefined \
22*9e5ef164SPaolo Bonzini    --extra-cflags=-fno-sanitize=float-divide-by-zero"
23c8908570SFam Zhengbuild_qemu $OPTS
243f9747a7SAlex Bennéecheck_qemu
2562838478SPaolo Bonziniinstall_qemu
26