Commit 82c89e8f authored by Alexander Richardson's avatar Alexander Richardson
Browse files

tests: check whether -Wl,--unresolved-symbols=ignore-all is supported



When linking for macOS, this linker flag is rejected. Instead of
always passing it, we can check whether it is supported first.
Signed-off-by: Alexander Richardson's avatarAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Reviewed-by: Simon Ser's avatarSimon Ser <contact@emersion.fr>
parent 78f654ed
Pipeline #420773 passed with stages
in 15 minutes and 4 seconds
......@@ -24,6 +24,10 @@ endforeach
add_languages('c', 'cpp', native: false)
replace = find_program('replace.py')
extra_linker_flags = meson.get_compiler('c').get_supported_link_arguments([
'-Wl,--unresolved-symbols=ignore-all',
])
foreach protocol_file : protocol_files
xml_file = fs.name(protocol_file)
xml_components = xml_file.split('.')
......@@ -100,9 +104,7 @@ foreach protocol_file : protocol_files
server_header,
code
],
link_args: [
'-Wl,--unresolved-symbols=ignore-all',
],
link_args: extra_linker_flags,
dependencies: libwayland,
c_args: [
'-std=c99',
......@@ -130,7 +132,7 @@ foreach protocol_file : protocol_files
client_header,
server_header,
],
link_args: [ '-Wl,--unresolved-symbols=ignore-all' ],
link_args: extra_linker_flags,
dependencies: libwayland,
cpp_args: [
'-Wall',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment