diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-06-02 18:12:10 +0100 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-06-07 12:57:39 +0000 |
commit | 1f5c6d62bf1e88ae24dce79b5d7a586e8f783371 (patch) | |
tree | dd60d405ef275549f2e7b108dd7867d3257f1e10 /run_unittests.py | |
parent | a7fc3fe3561c0b15a5263192a1645c765adf0ec2 (diff) | |
download | meson-1f5c6d62bf1e88ae24dce79b5d7a586e8f783371.zip meson-1f5c6d62bf1e88ae24dce79b5d7a586e8f783371.tar.gz meson-1f5c6d62bf1e88ae24dce79b5d7a586e8f783371.tar.bz2 |
More clearly explain portability issues with linking to a module
Refine #3277
According to what I read on the internet, on OSX, both MH_BUNDLE (module)
and MH_DYLIB (shared library) can be dynamically loaded using dlopen(), but
it is not possible to link against MH_BUNDLE as if they were shared
libraries.
Metion this as an issue in the documentation.
Emitting a warning, and then going on to fail during the build with
mysterious errors in symbolextractor isn't very helpful, so make attempting
this an error on OSX.
Add a test for that.
See also:
https://docstore.mik.ua/orelly/unix3/mac/ch05_03.htm
https://stackoverflow.com/questions/2339679/what-are-the-differences-between-so-and-dylib-on-osx
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/run_unittests.py b/run_unittests.py index f17b69b..61c0816 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -1943,14 +1943,17 @@ int main(int argc, char **argv) { exception_raised = True self.assertTrue(exception_raised, 'Double locking did not raise exception.') + @unittest.skipIf(is_osx(), 'Test not applicable to OSX') def test_check_module_linking(self): """ - Test that shared modules are not linked with targets(link_with:) #2865 + Test that link_with: a shared module issues a warning + https://github.com/mesonbuild/meson/issues/2865 + (That an error is raised on OSX is exercised by test failing/78) """ tdir = os.path.join(self.unit_test_dir, '26 shared_mod linking') out = self.init(tdir) msg = ('''WARNING: target links against shared modules. This is not -recommended as it can lead to undefined behaviour on some platforms''') +recommended as it is not supported on some platforms''') self.assertIn(msg, out) def test_ndebug_if_release_disabled(self): |