[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 33/46] meson: keep all compiler flags detection together
From: |
Paolo Bonzini |
Subject: |
[PULL 33/46] meson: keep all compiler flags detection together |
Date: |
Fri, 4 Sep 2020 07:41:09 -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 a222a50a23..a1705d33af 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 add_languages('cpp', required: false, native: false)
cxx = meson.get_compiler('cpp')
@@ -78,17 +89,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
- [PULL 22/46] tests: do not print benchmark output to stdout, (continued)
- [PULL 22/46] tests: do not print benchmark output to stdout, Paolo Bonzini, 2020/09/04
- [PULL 24/46] tests/migration/stress: remove unused exit_success, Paolo Bonzini, 2020/09/04
- [PULL 23/46] meson: convert the speed tests, Paolo Bonzini, 2020/09/04
- [PULL 25/46] meson: fix migration/stress compilation with glibc>=2.30, Paolo Bonzini, 2020/09/04
- [PULL 26/46] meson: convert migration/initrd-stress, Paolo Bonzini, 2020/09/04
- [PULL 27/46] configure: remove dead code for in-tree builds, Paolo Bonzini, 2020/09/04
- [PULL 28/46] meson: compute config_all_devices directly, Paolo Bonzini, 2020/09/04
- [PULL 29/46] Makefile: remove dead variables and includes, Paolo Bonzini, 2020/09/04
- [PULL 31/46] configure: move disassembler configuration to meson, Paolo Bonzini, 2020/09/04
- [PULL 32/46] configure: move C++ compiler handling to meson, Paolo Bonzini, 2020/09/04
- [PULL 33/46] meson: keep all compiler flags detection together,
Paolo Bonzini <=
- [PULL 35/46] configure: remove unnecessary libm test, Paolo Bonzini, 2020/09/04
- [PULL 40/46] docs: suggest Meson replacements for various configure functions, Paolo Bonzini, 2020/09/04
- [PULL 41/46] configure: update dtc submodule, Paolo Bonzini, 2020/09/04
- [PULL 34/46] configure: move -ldl test to meson, Paolo Bonzini, 2020/09/04
- [PULL 37/46] meson: get glib compilation flags from GLIB_CFLAGS, Paolo Bonzini, 2020/09/04
- [PULL 30/46] Makefile: inline the relevant parts of rules.mak, Paolo Bonzini, 2020/09/04
- [PULL 36/46] configure: do not look for install(1), Paolo Bonzini, 2020/09/04
- [PULL 39/46] configure: drop dead variables and functions, Paolo Bonzini, 2020/09/04
- [PULL 38/46] configure: do not include dependency flags in QEMU_CFLAGS and LIBS, Paolo Bonzini, 2020/09/04
- [PULL 43/46] meson: specify fuzz linker script as a project arg, Paolo Bonzini, 2020/09/04