blob: 8c51ead5181b708dbd7d0f82486ec0780b9199ff [file] [log] [blame]
Fam Zhengc8908572016-06-01 12:25:23 +08001#!/bin/bash -e
2#
3# Compile and check with clang.
4#
5# Copyright (c) 2016 Red Hat Inc.
6#
7# Authors:
8# Fam Zheng <famz@redhat.com>
9#
10# This work is licensed under the terms of the GNU GPL, version 2
11# or (at your option) any later version. See the COPYING file in
12# the top-level directory.
13
14. common.rc
15
16requires clang
17
Fam Zhengc16fe842016-09-28 15:31:32 +080018cd "$BUILD_DIR"
19
Paolo Bonzini9e5ef162019-10-01 15:48:55 +020020OPTS="--cxx=clang++ --cc=clang --host-cc=clang"
21OPTS="$OPTS --extra-cflags=-fsanitize=undefined \
22 --extra-cflags=-fno-sanitize=float-divide-by-zero"
Fam Zhengc8908572016-06-01 12:25:23 +080023build_qemu $OPTS
Alex Bennée3f9747a2018-07-09 13:27:54 +010024check_qemu
Paolo Bonzini62838472017-09-22 17:49:31 +020025install_qemu