diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-07-03 23:24:09 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-08-09 19:46:49 +0300 |
commit | 3c62eaa9ff25b25f34bd42f79031bfc333ff67e2 (patch) | |
tree | b4f0b03a6b6df685bd2ee3354f345b197d59fdd6 | |
parent | 6a0e6740432dfd22c54976ae3fe2fc1c9fea0b3d (diff) | |
download | meson-3c62eaa9ff25b25f34bd42f79031bfc333ff67e2.zip meson-3c62eaa9ff25b25f34bd42f79031bfc333ff67e2.tar.gz meson-3c62eaa9ff25b25f34bd42f79031bfc333ff67e2.tar.bz2 |
Updated sample projects to use visibility kwarg.
-rw-r--r-- | mesonbuild/minit.py | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/mesonbuild/minit.py b/mesonbuild/minit.py index 1a83ed2..7dd482b 100644 --- a/mesonbuild/minit.py +++ b/mesonbuild/minit.py @@ -72,16 +72,10 @@ lib_c_meson_template = '''project('{project_name}', 'c', # not the executables that use the library. lib_args = ['-DBUILDING_{utoken}'] -# Hiding symbols that are not explicitly marked as exported -# requires a compiler flag on all compilers except VS. -cc = meson.get_compiler('c') -if cc.get_id() != 'msvc' - lib_args += ['-fvisibility=hidden'] -endif - shlib = shared_library('{lib_name}', '{source_file}', install : true, c_args : lib_args, + symbol_visibility : 'hidden', ) test_exe = executable('{test_exe_name}', '{test_source_file}', @@ -226,16 +220,10 @@ lib_cpp_meson_template = '''project('{project_name}', 'cpp', # not the executables that use the library. lib_args = ['-DBUILDING_{utoken}'] -# Hiding symbols that are not explicitly marked as exported -# requires a compiler flag on all compilers except VS. -cpp = meson.get_compiler('cpp') -if cpp.get_id() != 'msvc' - lib_args += ['-fvisibility=hidden'] -endif - shlib = shared_library('{lib_name}', '{source_file}', install : true, cpp_args : lib_args, + symbol_visibility : 'hidden', ) test_exe = executable('{test_exe_name}', '{test_source_file}', |