Fam Zheng | c890857 | 2016-06-01 12:25:23 +0800 | [diff] [blame] | 1 | #!/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 | |
| 16 | requires clang |
| 17 | |
Fam Zheng | c16fe84 | 2016-09-28 15:31:32 +0800 | [diff] [blame] | 18 | cd "$BUILD_DIR" |
| 19 | |
Paolo Bonzini | 9e5ef16 | 2019-10-01 15:48:55 +0200 | [diff] [blame] | 20 | OPTS="--cxx=clang++ --cc=clang --host-cc=clang" |
| 21 | OPTS="$OPTS --extra-cflags=-fsanitize=undefined \ |
| 22 | --extra-cflags=-fno-sanitize=float-divide-by-zero" |
Fam Zheng | c890857 | 2016-06-01 12:25:23 +0800 | [diff] [blame] | 23 | build_qemu $OPTS |
Alex Bennée | 3f9747a | 2018-07-09 13:27:54 +0100 | [diff] [blame] | 24 | check_qemu |
Paolo Bonzini | 6283847 | 2017-09-22 17:49:31 +0200 | [diff] [blame] | 25 | install_qemu |