diff options
author | Daniel Hoffman <dhoff749@gmail.com> | 2023-11-19 12:31:16 -0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-12-02 15:56:49 -0500 |
commit | c04cfb4596ad5032a9869a8f77fe9114ca8af9e0 (patch) | |
tree | acbe3e81fd6f8f3a4f879f8f519ab20330f5880a /qemu-img.c | |
parent | 20bc50137f3add52eb4788b420d717de27fed14b (diff) |
hw/i386: fix short-circuit logic with non-optimizing builds
`kvm_enabled()` is compiled down to `0` and short-circuit logic is
used to remove references to undefined symbols at the compile stage.
Some build configurations with some compilers don't attempt to
simplify this logic down in some cases (the pattern appears to be
that the literal false must be the first term) and this was causing
some builds to emit references to undefined symbols.
An example of such a configuration is clang 16.0.6 with the following
configure: ./configure --enable-debug --without-default-features
--target-list=x86_64-softmmu --enable-tcg-interpreter
Signed-off-by: Daniel Hoffman <dhoff749@gmail.com>
Message-Id: <20231119203116.3027230-1-dhoff749@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'qemu-img.c')
0 files changed, 0 insertions, 0 deletions