diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2018-04-27 17:45:23 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2018-04-28 12:36:00 +0100 |
commit | 5839aeadbdcf08d039eef3a809dc5d78e2c7ba38 (patch) | |
tree | c90540762660535f833d5ba3a6ab93bc312b2fbc /orc-test | |
parent | f77a850077633ee68038bfa2cc7c47a98208df5a (diff) |
meson: fix symbol export with MSVC and use -fvisibility elsewhere
Use newly-added ORC_API decorators to export symbols explicitly.
Get rid of orc.map file and the ORC_EXPORT stuff that never did
anything anyway (define was unused).
Diffstat (limited to 'orc-test')
-rw-r--r-- | orc-test/meson.build | 12 | ||||
-rw-r--r-- | orc-test/orc-test.map | 6 | ||||
-rw-r--r-- | orc-test/orctest.h | 6 |
3 files changed, 6 insertions, 18 deletions
diff --git a/orc-test/meson.build b/orc-test/meson.build index 994f391..d0471e0 100644 --- a/orc-test/meson.build +++ b/orc-test/meson.build @@ -3,27 +3,19 @@ orc_test_sources = ['orctest.c', 'orcarray.c', 'orcrandom.c', 'orcprofile.c'] install_headers(orc_test_headers, subdir : 'orc-' + orc_api + '/orc-test') -if cc.get_id() != 'msvc' - link_args = ['-Wl,--version-script,' + meson.current_source_dir() + '/orc-test.map'] -else - link_args = [] -endif - orc_test_shr = shared_library ('orc-test-' + orc_api, orc_test_sources, version : libversion, soversion : soversion, include_directories : orc_inc, - c_args : [ orc_c_args , '-DORC_ENABLE_UNSTABLE_API' ], + c_args : orc_c_args + ['-DBUILDING_ORC_TEST'], dependencies : [libm, orc_dep], - link_args : link_args, - link_depends : 'orc-test.map', install : true) orc_test_sta = static_library ('orc-test-' + orc_api, objects : orc_test_shr.extract_all_objects(), include_directories : orc_inc, - c_args : [ orc_c_args , '-DORC_ENABLE_UNSTABLE_API' ], + c_args : orc_c_args + ['-DBUILDING_ORC_TEST'], dependencies : [libm, orc_dep], install : true) diff --git a/orc-test/orc-test.map b/orc-test/orc-test.map deleted file mode 100644 index 47f2b25..0000000 --- a/orc-test/orc-test.map +++ /dev/null @@ -1,6 +0,0 @@ -{ -global: - orc_*; -local: - *; -}; diff --git a/orc-test/orctest.h b/orc-test/orctest.h index eddb0c7..6a86835 100644 --- a/orc-test/orctest.h +++ b/orc-test/orctest.h @@ -7,8 +7,10 @@ ORC_BEGIN_DECLS -#ifndef ORC_TEST_API -#define ORC_TEST_API extern +#ifdef BUILDING_ORC_TEST +#define ORC_TEST_API ORC_API_EXPORT /* defined in config.h */ +#else +#define ORC_TEST_API ORC_API_IMPORT #endif typedef enum { |