Mesa (main): meson: Use cc.get_argument_syntax instead cc.get_id when possible.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 16 20:37:48 UTC 2022
Module: Mesa
Branch: main
Commit: 2d934ac11008d4a287aa94fbceed550e64bd346a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2d934ac11008d4a287aa94fbceed550e64bd346a
Author: Yonggang Luo <luoyonggang at gmail.com>
Date: Thu Apr 21 14:06:17 2022 +0800
meson: Use cc.get_argument_syntax instead cc.get_id when possible.
Signed-off-by: Yonggang Luo <luoyonggang at gmail.com>
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17065>
---
meson.build | 10 +++++-----
src/gallium/frontends/d3d10umd/meson.build | 2 +-
src/meson.build | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/meson.build b/meson.build
index c1f3e06941a..a7958e43545 100644
--- a/meson.build
+++ b/meson.build
@@ -1108,7 +1108,7 @@ elif host_machine.system() == 'windows'
'-DPIPE_SUBSYSTEM_WINDOWS_USER',
'-D_USE_MATH_DEFINES', # XXX: scons didn't use this for mingw
]
- if cc.get_id() == 'msvc'
+ if cc.get_argument_syntax() == 'msvc'
pre_args += [
'-DVC_EXTRALEAN',
'-D_CRT_SECURE_NO_WARNINGS',
@@ -1141,7 +1141,7 @@ endif
c_msvc_compat_args = []
no_override_init_args = []
cpp_msvc_compat_args = []
-if cc.get_id() == 'msvc'
+if cc.get_argument_syntax() == 'msvc'
_trial = [
'/wd4018', # signed/unsigned mismatch
'/wd4056', # overflow in floating-point constant arithmetic
@@ -1203,7 +1203,7 @@ else
]
# MinGW chokes on format specifiers and I can't get it all working
- if not (cc.get_id() == 'gcc' and host_machine.system() == 'windows')
+ if not (cc.get_argument_syntax() == 'gcc' and host_machine.system() == 'windows')
_trial_c += ['-Werror=format', '-Wformat-security']
_trial_cpp += ['-Werror=format', '-Wformat-security']
endif
@@ -1247,7 +1247,7 @@ endif
# set linker arguments
if host_machine.system() == 'windows'
- if cc.get_id() == 'msvc'
+ if cc.get_argument_syntax() == 'msvc'
add_project_link_arguments(
'/fixed:no',
'/dynamicbase',
@@ -1282,7 +1282,7 @@ if host_machine.system() == 'windows'
endif
endif
-if host_machine.cpu_family().startswith('x86') and cc.get_id() != 'msvc'
+if host_machine.cpu_family().startswith('x86') and cc.get_argument_syntax() != 'msvc'
pre_args += '-DUSE_SSE41'
with_sse41 = true
sse41_args = ['-msse4.1']
diff --git a/src/gallium/frontends/d3d10umd/meson.build b/src/gallium/frontends/d3d10umd/meson.build
index 7141c8da17f..28c27f0cf8e 100644
--- a/src/gallium/frontends/d3d10umd/meson.build
+++ b/src/gallium/frontends/d3d10umd/meson.build
@@ -1,7 +1,7 @@
inc_d3d10umd = include_directories('.')
_c_args_d3d10umd = []
-if cc.get_id() == 'gcc'
+if cc.get_argument_syntax() == 'gcc'
_c_args_d3d10umd += '-Wno-unknown-pragmas'
endif
diff --git a/src/meson.build b/src/meson.build
index ebff41635be..8700088e54b 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -58,7 +58,7 @@ sha1_h = custom_target(
)
subdir('gtest')
-if cc.get_id() == 'msvc'
+if cc.get_argument_syntax() == 'msvc'
subdir('getopt')
else
idep_getopt = null_dep
More information about the mesa-commit
mailing list