diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-12-04 20:15:06 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-12-04 20:15:06 +0200 |
commit | b54fc1d00e5488e4dcc31f8f1a9f37226819ba24 (patch) | |
tree | 7e40ca76e1d69ef1c18b3eed9f406800bd3f9b7d /test cases | |
parent | a5dcb89410973f4bfa872cd58616272355638963 (diff) | |
download | meson-b54fc1d00e5488e4dcc31f8f1a9f37226819ba24.zip meson-b54fc1d00e5488e4dcc31f8f1a9f37226819ba24.tar.gz meson-b54fc1d00e5488e4dcc31f8f1a9f37226819ba24.tar.bz2 |
Apply magical flags to make OSX ignore missing symbols in plugins.
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/common/125 shared module/meson.build | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/test cases/common/125 shared module/meson.build b/test cases/common/125 shared module/meson.build index 44abf55..6fd21c2 100644 --- a/test cases/common/125 shared module/meson.build +++ b/test cases/common/125 shared module/meson.build @@ -2,18 +2,11 @@ project('shared module', 'c') dl = meson.get_compiler('c').find_library('dl', required : false) l = shared_library('runtime', 'runtime.c') -if host_machine.system() == 'darwin' or host_machine.system() == 'windows' - # At least in OSX and seemingly also on Windows you must have - # all symbols present when linking a module. - # - # In Linux many projects build plugins without linking to - # the runtime so they have undefined symbols. We need to support - # both for ease of transitioning. - mlink = [l] -else - mlink = [] -endif -m = shared_module('mymodule', 'module.c', link_with : mlink) +# Do NOT link the module with the runtime library. This +# is a common approach for plugins that are only used +# with dlopen. Any symbols are resolved dynamically +# at runtime +m = shared_module('mymodule', 'module.c') e = executable('prog', 'prog.c', link_with : l, dependencies : dl) test('import test', e, args : [m.full_path()]) |