[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 27/55] meson: switch minimum meson version to 0.56.0
From: |
Paolo Bonzini |
Subject: |
[PULL 27/55] meson: switch minimum meson version to 0.56.0 |
Date: |
Mon, 21 Dec 2020 15:44:19 +0100 |
Meson 0.56.0 does not need b_staticpic=$pie anymore, and has
stabilized the keyval module. Remove the workaround and use a few
replacements for features deprecated in that release cycle.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 5 ----
docs/meson.build | 12 ++++----
meson.build | 54 ++++++++++++++++-------------------
plugins/meson.build | 4 +--
tests/meson.build | 2 +-
tests/qapi-schema/meson.build | 4 +--
tests/qtest/meson.build | 2 +-
trace/meson.build | 4 +--
8 files changed, 39 insertions(+), 48 deletions(-)
diff --git a/configure b/configure
index 0a6de3b8ef..ce4f365231 100755
--- a/configure
+++ b/configure
@@ -6963,10 +6963,6 @@ fi
mv $cross config-meson.cross
rm -rf meson-private meson-info meson-logs
-unset staticpic
-if ! version_ge "$($meson --version)" 0.56.0; then
- staticpic=$(if test "$pie" = yes; then echo true; else echo false; fi)
-fi
NINJA=$ninja $meson setup \
--prefix "$prefix" \
--libdir "$libdir" \
@@ -6986,7 +6982,6 @@ NINJA=$ninja $meson setup \
-Dwerror=$(if test "$werror" = yes; then echo true; else echo false;
fi) \
-Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false;
fi) \
-Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \
- ${staticpic:+-Db_staticpic=$staticpic} \
-Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false;
fi) \
-Db_lto=$lto -Dcfi=$cfi -Dcfi_debug=$cfi_debug \
-Dmalloc=$malloc -Dmalloc_trim=$malloc_trim -Dsparse=$sparse \
diff --git a/docs/meson.build b/docs/meson.build
index bb8fe4c9e4..4e88ed7516 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -38,12 +38,12 @@ endif
if build_docs
SPHINX_ARGS += ['-Dversion=' + meson.project_version(), '-Drelease=' +
config_host['PKGVERSION']]
- sphinx_extn_depends = [ meson.source_root() / 'docs/sphinx/depfile.py',
- meson.source_root() / 'docs/sphinx/hxtool.py',
- meson.source_root() / 'docs/sphinx/kerneldoc.py',
- meson.source_root() / 'docs/sphinx/kernellog.py',
- meson.source_root() / 'docs/sphinx/qapidoc.py',
- meson.source_root() / 'docs/sphinx/qmp_lexer.py',
+ sphinx_extn_depends = [ meson.current_source_dir() / 'sphinx/depfile.py',
+ meson.current_source_dir() / 'sphinx/hxtool.py',
+ meson.current_source_dir() / 'sphinx/kerneldoc.py',
+ meson.current_source_dir() / 'sphinx/kernellog.py',
+ meson.current_source_dir() / 'sphinx/qapidoc.py',
+ meson.current_source_dir() / 'sphinx/qmp_lexer.py',
qapi_gen_depends ]
configure_file(output: 'index.html',
diff --git a/meson.build b/meson.build
index ada35d56e1..34ecb93b03 100644
--- a/meson.build
+++ b/meson.build
@@ -1,14 +1,10 @@
-project('qemu', ['c'], meson_version: '>=0.55.0',
- default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11',
'b_colorout=auto'] +
- (meson.version().version_compare('>=0.56.0') ? [
'b_staticpic=false' ] : []),
- version: run_command('head', meson.source_root() /
'VERSION').stdout().strip())
+project('qemu', ['c'], meson_version: '>=0.56.0',
+ default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11',
'b_colorout=auto',
+ 'b_staticpic=false'],
+ version: run_command('head', meson.project_source_root() /
'VERSION').stdout().strip())
not_found = dependency('', required: false)
-if meson.version().version_compare('>=0.56.0')
- keyval = import('keyval')
-else
- keyval = import('unstable-keyval')
-endif
+keyval = import('keyval')
ss = import('sourceset')
fs = import('fs')
@@ -1372,21 +1368,21 @@ genh += configure_file(output: 'config-host.h',
configuration: config_host_data)
hxtool = find_program('scripts/hxtool')
shaderinclude = find_program('scripts/shaderinclude.pl')
qapi_gen = find_program('scripts/qapi-gen.py')
-qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/__init__.py',
- meson.source_root() / 'scripts/qapi/commands.py',
- meson.source_root() / 'scripts/qapi/common.py',
- meson.source_root() / 'scripts/qapi/error.py',
- meson.source_root() / 'scripts/qapi/events.py',
- meson.source_root() / 'scripts/qapi/expr.py',
- meson.source_root() / 'scripts/qapi/gen.py',
- meson.source_root() / 'scripts/qapi/introspect.py',
- meson.source_root() / 'scripts/qapi/parser.py',
- meson.source_root() / 'scripts/qapi/schema.py',
- meson.source_root() / 'scripts/qapi/source.py',
- meson.source_root() / 'scripts/qapi/types.py',
- meson.source_root() / 'scripts/qapi/visit.py',
- meson.source_root() / 'scripts/qapi/common.py',
- meson.source_root() / 'scripts/qapi-gen.py'
+qapi_gen_depends = [ meson.current_source_dir() / 'scripts/qapi/__init__.py',
+ meson.current_source_dir() / 'scripts/qapi/commands.py',
+ meson.current_source_dir() / 'scripts/qapi/common.py',
+ meson.current_source_dir() / 'scripts/qapi/error.py',
+ meson.current_source_dir() / 'scripts/qapi/events.py',
+ meson.current_source_dir() / 'scripts/qapi/expr.py',
+ meson.current_source_dir() / 'scripts/qapi/gen.py',
+ meson.current_source_dir() / 'scripts/qapi/introspect.py',
+ meson.current_source_dir() / 'scripts/qapi/parser.py',
+ meson.current_source_dir() / 'scripts/qapi/schema.py',
+ meson.current_source_dir() / 'scripts/qapi/source.py',
+ meson.current_source_dir() / 'scripts/qapi/types.py',
+ meson.current_source_dir() / 'scripts/qapi/visit.py',
+ meson.current_source_dir() / 'scripts/qapi/common.py',
+ meson.current_source_dir() / 'scripts/qapi-gen.py'
]
tracetool = [
@@ -1895,14 +1891,14 @@ foreach target : target_dirs
if target.endswith('-softmmu')
execs = [{
'name': 'qemu-system-' + target_name,
- 'gui': false,
+ 'win_subsystem': 'console',
'sources': files('softmmu/main.c'),
'dependencies': []
}]
if targetos == 'windows' and (sdl.found() or gtk.found())
execs += [{
'name': 'qemu-system-' + target_name + 'w',
- 'gui': true,
+ 'win_subsystem': 'windows',
'sources': files('softmmu/main.c'),
'dependencies': []
}]
@@ -1911,7 +1907,7 @@ foreach target : target_dirs
specific_fuzz = specific_fuzz_ss.apply(config_target, strict: false)
execs += [{
'name': 'qemu-fuzz-' + target_name,
- 'gui': false,
+ 'win_subsystem': 'console',
'sources': specific_fuzz.sources(),
'dependencies': specific_fuzz.dependencies(),
}]
@@ -1919,7 +1915,7 @@ foreach target : target_dirs
else
execs = [{
'name': 'qemu-' + target_name,
- 'gui': false,
+ 'win_subsystem': 'console',
'sources': [],
'dependencies': []
}]
@@ -1934,7 +1930,7 @@ foreach target : target_dirs
link_language: link_language,
link_depends: [block_syms, qemu_syms] + exe.get('link_depends',
[]),
link_args: link_args,
- gui_app: exe['gui'])
+ win_subsystem: exe['win_subsystem'])
}
if 'CONFIG_TRACE_SYSTEMTAP' in config_host
diff --git a/plugins/meson.build b/plugins/meson.build
index e77723010e..d58efc980e 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -1,7 +1,7 @@
if 'CONFIG_HAS_LD_DYNAMIC_LIST' in config_host
- plugin_ldflags = ['-Wl,--dynamic-list=' + (meson.build_root() /
'qemu-plugins-ld.symbols')]
+ plugin_ldflags = ['-Wl,--dynamic-list=' + (meson.project_build_root() /
'qemu-plugins-ld.symbols')]
elif 'CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST' in config_host
- plugin_ldflags = ['-Wl,-exported_symbols_list,' + (meson.build_root() /
'qemu-plugins-ld64.symbols')]
+ plugin_ldflags = ['-Wl,-exported_symbols_list,' +
(meson.project_build_root() / 'qemu-plugins-ld64.symbols')]
else
plugin_ldflags = []
endif
diff --git a/tests/meson.build b/tests/meson.build
index 1fa068f27b..0b8c3c6f32 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -113,7 +113,7 @@ tests = {
'test-keyval': [testqapi],
'test-logging': [],
'test-uuid': [],
- 'ptimer-test': ['ptimer-test-stubs.c', meson.source_root() /
'hw/core/ptimer.c'],
+ 'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() /
'hw/core/ptimer.c'],
'test-qapi-util': [],
}
diff --git a/tests/qapi-schema/meson.build b/tests/qapi-schema/meson.build
index 304ef939bd..26588396d2 100644
--- a/tests/qapi-schema/meson.build
+++ b/tests/qapi-schema/meson.build
@@ -1,5 +1,5 @@
test_env = environment()
-test_env.set('PYTHONPATH', meson.source_root() / 'scripts')
+test_env.set('PYTHONPATH', meson.project_source_root() / 'scripts')
test_env.set('PYTHONIOENCODING', 'utf-8')
schemas = [
@@ -240,7 +240,7 @@ if build_docs
# clutter up the build dir with the cache.
command: [SPHINX_ARGS,
'-b', 'text', '-E',
- '-c', meson.source_root() / 'docs',
+ '-c', meson.project_source_root() /
'docs',
'-D', 'master_doc=doc-good',
meson.current_source_dir(),
meson.current_build_dir()])
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index 6a67c538be..450af3e51c 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -237,7 +237,7 @@ foreach dir : target_dirs
qtest_env.set('QTEST_QEMU_IMG', './qemu-img')
test_deps += [qemu_img]
endif
- qtest_env.set('G_TEST_DBUS_DAEMON', meson.source_root() /
'tests/dbus-vmstate-daemon.sh')
+ qtest_env.set('G_TEST_DBUS_DAEMON', meson.project_source_root() /
'tests/dbus-vmstate-daemon.sh')
qtest_env.set('QTEST_QEMU_BINARY', './qemu-system-' + target_base)
foreach test : target_qtests
diff --git a/trace/meson.build b/trace/meson.build
index b19309b327..012d0dbceb 100644
--- a/trace/meson.build
+++ b/trace/meson.build
@@ -2,7 +2,7 @@ specific_ss.add(files('control-target.c'))
trace_events_files = []
foreach dir : [ '.' ] + trace_events_subdirs
- trace_events_file = meson.source_root() / dir / 'trace-events'
+ trace_events_file = meson.project_source_root() / dir / 'trace-events'
trace_events_files += [ trace_events_file ]
group_name = dir == '.' ? 'root' : dir.underscorify()
group = '--group=' + group_name
@@ -68,7 +68,7 @@ foreach d : [
]
gen = custom_target(d[0],
output: d[0],
- input: meson.source_root() / 'trace-events',
+ input: meson.project_source_root() / 'trace-events',
command: [ tracetool, '--group=root',
'--format=@0@'.format(d[1]), '@INPUT@' ],
capture: true)
specific_ss.add(when: 'CONFIG_TCG', if_true: gen)
--
2.29.2
- [PULL 18/55] check-block: enable iotests with cfi-icall, (continued)
- [PULL 18/55] check-block: enable iotests with cfi-icall, Paolo Bonzini, 2020/12/21
- [PULL 19/55] configure,meson: support Control-Flow Integrity, Paolo Bonzini, 2020/12/21
- [PULL 20/55] docs: Add CFI Documentation, Paolo Bonzini, 2020/12/21
- [PULL 29/55] meson: use pkg-config method for libudev, Paolo Bonzini, 2020/12/21
- [PULL 25/55] Makefile: add dummy target for build.ninja dependencies, Paolo Bonzini, 2020/12/21
- [PULL 43/55] libssh: convert to meson, Paolo Bonzini, 2020/12/21
- [PULL 48/55] zstd: convert to meson, Paolo Bonzini, 2020/12/21
- [PULL 50/55] virtfs: convert to meson, Paolo Bonzini, 2020/12/21
- [PULL 13/55] test-char: Destroy chardev correctly at char_file_test_internal(), Paolo Bonzini, 2020/12/21
- [PULL 35/55] configure: remove CONFIG_FILEVERSION and CONFIG_PRODUCTVERSION, Paolo Bonzini, 2020/12/21
- [PULL 27/55] meson: switch minimum meson version to 0.56.0,
Paolo Bonzini <=
- [PULL 55/55] win32: drop fd registration to the main-loop on setting non-block, Paolo Bonzini, 2020/12/21
- [PULL 32/55] configure: remove useless code to check for Xen PCI passthrough, Paolo Bonzini, 2020/12/21
- [PULL 37/55] curl: remove compatibility code, require 7.29.0, Paolo Bonzini, 2020/12/21
- [PULL 36/55] brlapi: convert to meson, Paolo Bonzini, 2020/12/21
- [PULL 30/55] meson: use dependency to gate block modules, Paolo Bonzini, 2020/12/21
- [PULL 09/55] tests/docker: Remove the remainders of debian9 containers from the Makefile, Paolo Bonzini, 2020/12/21
- [PULL 23/55] util: Extract flush_icache_range to cacheflush.c, Paolo Bonzini, 2020/12/21
- [PULL 34/55] configure: accept --enable-slirp, Paolo Bonzini, 2020/12/21
- [PULL 28/55] meson: fix detection of curses with pkgconfig, Paolo Bonzini, 2020/12/21
- [PULL 26/55] meson: update submodule to 0.56.0, Paolo Bonzini, 2020/12/21