[sysprof/wip/chergert/sysprof-3] build: cleanup visibility for symbols
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/chergert/sysprof-3] build: cleanup visibility for symbols
- Date: Wed, 8 May 2019 17:56:49 +0000 (UTC)
commit 4740cbd758f23680f5fb0cde48881b1579ecc7cc
Author: Christian Hergert <chergert redhat com>
Date: Wed May 8 10:33:34 2019 -0700
build: cleanup visibility for symbols
meson.build | 31 ++++++++++++++-----------------
1 file changed, 14 insertions(+), 17 deletions(-)
---
diff --git a/meson.build b/meson.build
index 9610ff8..b0fd4b3 100644
--- a/meson.build
+++ b/meson.build
@@ -32,6 +32,20 @@ config_h.set('PACKAGE_TARNAME', 'PACKAGE_STRING')
config_h.set('PACKAGE', 'PACKAGE_NAME')
config_h.set('VERSION', 'PACKAGE_VERSION')
+# Detect and set symbol visibility
+if get_option('default_library') != 'static'
+ if host_machine.system() == 'windows'
+ config_h.set('DLL_EXPORT', true)
+ if cc.get_id() == 'msvc'
+ config_h.set('_SYSPROF_EXTERN', '__declspec(dllexport) extern')
+ elif cc.has_argument('-fvisibility=hidden')
+ config_h.set('_SYSPROF_EXTERN', '__attribute__((visibility("default"))) __declspec(dllexport) extern')
+ endif
+ elif cc.has_argument('-fvisibility=hidden')
+ config_h.set('_SYSPROF_EXTERN', '__attribute__((visibility("default"))) extern')
+ endif
+endif
+
if get_option('with_sysprofd') != 'none'
config_h.set10('ENABLE_POLKIT', true)
endif
@@ -103,23 +117,6 @@ foreach arg: test_c_args
endif
endforeach
-# Detect and set symbol visibility
-hidden_visibility_args = []
-if get_option('default_library') != 'static'
- if host_machine.system() == 'windows'
- config_h.set('DLL_EXPORT', true)
- if cc.get_id() == 'msvc'
- config_h.set('_SP_EXTERN', '__declspec(dllexport) extern')
- elif cc.has_argument('-fvisibility=hidden')
- config_h.set('_SP_EXTERN', '__attribute__((visibility("default"))) __declspec(dllexport) extern')
- hidden_visibility_args = ['-fvisibility=hidden']
- endif
- elif cc.has_argument('-fvisibility=hidden')
- config_h.set('_SP_EXTERN', '__attribute__((visibility("default"))) extern')
- hidden_visibility_args = ['-fvisibility=hidden']
- endif
-endif
-
add_project_arguments(global_c_args, language: 'c')
release_flags = []
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]