The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
809 B
16 lines
809 B
8 years ago
|
project('shared module resolving symbol in executable', 'c')
|
||
|
|
||
|
# The shared module contains a reference to the symbol 'func_from_executable',
|
||
|
# which is always provided by the executable which loads it. This symbol can be
|
||
|
# resolved at run-time by an ELF loader. But when building PE/COFF objects, all
|
||
|
# symbols must be resolved at link-time, so an implib is generated for the
|
||
|
# executable, and the shared module linked with it.
|
||
|
#
|
||
|
# See testcase 125 for an example of the more complex portability gymnastics
|
||
|
# required if we do not know (at link-time) what provides the symbol.
|
||
|
|
||
|
dl = meson.get_compiler('c').find_library('dl', required: false)
|
||
7 years ago
|
e = executable('prog', 'prog.c', dependencies: dl, export_dynamic: true)
|
||
8 years ago
|
m = shared_module('module', 'module.c', link_with: e)
|
||
8 years ago
|
test('test', e, args: m.full_path())
|