diff options
author | Dylan Baker <[email protected]> | 2017-09-30 13:15:52 -0700 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2017-10-16 16:32:43 -0700 |
commit | e21e0a6a70b84f384ac7b80b88415e8fa519026d (patch) | |
tree | 31f39b319d587fb186686721c80c59d3630f7a84 /meson.build | |
parent | e4796ab7c8a5f00c9f35124384c4d0d5fc155541 (diff) |
meson: add checks for version script and dynamic list
These are used by gallium drivers.
Signed-off-by: Dylan Baker <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 54230a91ed5..2f73215ca52 100644 --- a/meson.build +++ b/meson.build @@ -433,14 +433,28 @@ endif # Check for some linker flags ld_args_bsymbolic = [] -if cc.links('int main() { return 0; }', args : '-Wl,-Bsymbolic') +if cc.links('int main() { return 0; }', args : '-Wl,-Bsymbolic', name : 'Bsymbolic') ld_args_bsymbolic += '-Wl,-Bsymbolic' endif ld_args_gc_sections = [] if cc.links('static char unused() { return 5; } int main() { return 0; }', - args : '-Wl,--gc-sections') + args : '-Wl,--gc-sections', name : 'gc-sections') ld_args_gc_sections += '-Wl,--gc-sections' endif +with_ld_version_script = false +if cc.links('int main() { return 0; }', + args : '-Wl,--version-script=@0@'.format( + join_paths(meson.source_root(), 'build-support/conftest.map')), + name : 'version-script') + with_ld_version_script = true +endif +with_ld_dynamic_list = false +if cc.links('int main() { return 0; }', + args : '-Wl,--dynamic-list=@0@'.format( + join_paths(meson.source_root(), 'build-support/conftest.dyn')), + name : 'dynamic-list') + with_ld_dynamic_list = true +endif # check for dl support if cc.has_function('dlopen') |