[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 32/39] meson: keep all compiler flags detection together
From: |
Paolo Bonzini |
Subject: |
[PATCH 32/39] meson: keep all compiler flags detection together |
Date: |
Wed, 2 Sep 2020 08:59:10 -0400 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
meson.build | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/meson.build b/meson.build
index 57fadd3dab..4c32f5286f 100644
--- a/meson.build
+++ b/meson.build
@@ -32,6 +32,23 @@ endforeach
have_tools = 'CONFIG_TOOLS' in config_host
have_block = have_system or have_tools
+python = import('python').find_installation()
+
+supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin',
'sunos', 'linux']
+supported_cpus = ['ppc', 'ppc64', 's390x', 'sparc64', 'riscv32', 'riscv64',
'x86', 'x86_64',
+ 'arm', 'aarch64', 'mips', 'mips64', 'sparc', 'sparc64']
+
+cpu = host_machine.cpu_family()
+targetos = host_machine.system()
+
+configure_file(input: files('scripts/ninjatool.py'),
+ output: 'ninjatool',
+ configuration: config_host)
+
+##################
+# Compiler flags #
+##################
+
add_project_arguments(config_host['QEMU_CFLAGS'].split(),
native: false, language: ['c', 'objc'])
add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(),
@@ -39,12 +56,6 @@
add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(),
add_project_arguments(config_host['QEMU_INCLUDES'].split(),
language: ['c', 'cpp', 'objc'])
-python = import('python').find_installation()
-
-##################
-# Compiler flags #
-##################
-
link_language = 'c'
if not add_languages('cpp', required: false, native: false)
# no warning
@@ -73,17 +84,6 @@ if 'SPARSE_CFLAGS' in config_host
'compile_commands.json'])
endif
-configure_file(input: files('scripts/ninjatool.py'),
- output: 'ninjatool',
- configuration: config_host)
-
-supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin',
'sunos', 'linux']
-supported_cpus = ['ppc', 'ppc64', 's390x', 'sparc64', 'riscv32', 'riscv64',
'x86', 'x86_64',
- 'arm', 'aarch64', 'mips', 'mips64', 'sparc', 'sparc64']
-
-cpu = host_machine.cpu_family()
-targetos = host_machine.system()
-
m = cc.find_library('m', required: false)
util = cc.find_library('util', required: false)
winmm = []
--
2.26.2
- [PATCH 13/39] meson: declare keyutils dependency, (continued)
- [PATCH 13/39] meson: declare keyutils dependency, Paolo Bonzini, 2020/09/02
- [PATCH 09/39] ninjatool: use constant names for stamp files, Paolo Bonzini, 2020/09/02
- [PATCH 18/39] meson: remove old socket_scm_helper rule, Paolo Bonzini, 2020/09/02
- [PATCH 17/39] meson: move keyutils dependency check, Paolo Bonzini, 2020/09/02
- [PATCH 04/39] mtest2make: hide output of successful tests, Paolo Bonzini, 2020/09/02
- [PATCH 29/39] Makefile: inline the relevant parts of rules.mak, Paolo Bonzini, 2020/09/02
- [PATCH 26/39] configure: remove dead code for in-tree builds, Paolo Bonzini, 2020/09/02
- [PATCH 31/39] configure: move C++ compiler handling to meson, Paolo Bonzini, 2020/09/02
- [PATCH 22/39] meson: convert the speed tests, Paolo Bonzini, 2020/09/02
- [PATCH 25/39] meson: convert migration/initrd-stress, Paolo Bonzini, 2020/09/02
- [PATCH 32/39] meson: keep all compiler flags detection together,
Paolo Bonzini <=
- [PATCH 34/39] configure: remove unnecessary libm test, Paolo Bonzini, 2020/09/02
- [PATCH 39/39] docs: suggest Meson replacements for various configure functions, Paolo Bonzini, 2020/09/02
- [PATCH 36/39] meson: get glib compilation flags from GLIB_CFLAGS, Paolo Bonzini, 2020/09/02
- [PATCH 16/39] meson: convert the unit tests, Paolo Bonzini, 2020/09/02
- [PATCH 37/39] configure: do not include dependency flags in QEMU_CFLAGS and LIBS, Paolo Bonzini, 2020/09/02
- [PATCH 30/39] configure: move disassembler configuration to meson, Paolo Bonzini, 2020/09/02
- [PATCH 27/39] meson: compute config_all_devices directly, Paolo Bonzini, 2020/09/02
- [PATCH 28/39] Makefile: remove dead variables and includes, Paolo Bonzini, 2020/09/02
- [PATCH 38/39] configure: drop dead variables, Paolo Bonzini, 2020/09/02
- [PATCH 33/39] configure: move -ldl test to meson, Paolo Bonzini, 2020/09/02