mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-23 07:19:50 +00:00
meson: Use cc.get_argument_syntax instead cc.get_id when possible.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17065>
This commit is contained in:
parent
1173c0f33a
commit
2d934ac110
10
meson.build
10
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']
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user