amd/addrlib: use cpp.has_argument() to filter compiler arguments
Acked-by: Michel Dänzer <mdaenzer@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7846>
This commit is contained in:

committed by
Marge Bot

parent
6679a34394
commit
d0767fc045
@@ -53,12 +53,14 @@ files_addrlib = files(
|
||||
)
|
||||
|
||||
cpp_args_addrlib = []
|
||||
if cpp.get_id() != 'msvc'
|
||||
cpp_args_addrlib += '-Wno-unused-variable'
|
||||
cpp_args_addrlib += '-Wno-unused-local-typedefs'
|
||||
cpp_args_addrlib += '-Wno-unused-but-set-variable'
|
||||
cpp_args_addrlib += '-Wno-maybe-uninitialized'
|
||||
endif
|
||||
foreach w : ['-Wno-unused-variable', '-Wno-unused-local-typedefs',
|
||||
'-Wno-unused-but-set-variable', '-Wno-maybe-uninitialized']
|
||||
if cpp.has_argument(w)
|
||||
cpp_args_addrlib += w
|
||||
endif
|
||||
endforeach
|
||||
|
||||
message(cpp_args_addrlib)
|
||||
|
||||
libamdgpu_addrlib = static_library(
|
||||
'addrlib',
|
||||
|
Reference in New Issue
Block a user