[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL v2 00/11] capstone + disassembler patch queue
From: |
Paolo Bonzini |
Subject: |
Re: [PULL v2 00/11] capstone + disassembler patch queue |
Date: |
Sat, 3 Oct 2020 09:12:08 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 02/10/20 22:37, Peter Maydell wrote:
> ../src/meson.build:753: WARNING: Trying to compare values of different
> types (bool, str) using ==.
> The result of this is undefined and will become a hard error in a
> future Meson release.
> Configuring config-host.h using configuration
> Program scripts/hxtool found: YES
> Program scripts/shaderinclude.pl found: YES
> Program scripts/qapi-gen.py found: YES
> Program scripts/qemu-version.sh found: YES
> Run-time dependency threads found: YES
> Program keycodemapdb/tools/keymap-gen found: YES
> Program scripts/decodetree.py found: YES
This can be rewritten like
-if capstone_opt == 'disabled'
- capstone_opt = false
-elif capstone_opt in ['enabled', 'auto', 'system']
+if capstone_opt in ['enabled', 'auto', 'system']
have_internal = fs.exists('capstone/Makefile')
capstone = dependency('capstone', static: enable_static,
required: capstone_opt == 'system' or
capstone_opt == 'enabled' and not
have_internal)
if capstone.found()
capstone_opt = 'system'
elif have_internal
capstone_opt = 'internal'
else
- capstone_opt = false
+ capstone_opt = 'disabled'
endif
endif
if capstone_opt == 'internal'
...
-summary_info += {'capstone': capstone_opt}
+summary_info += {'capstone': capstone_opt == 'disabled' ? false :
capstone_opt}
That said, this also showed a bug which can be fixed like this:
- have_internal = fs.exists('capstone/Makefile')
+ have_internal = fs.exists(meson.current_source_dir() / 'capstone/Makefile')
Paolo