mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 10:08:56 +01:00 
			
		
		
		
	Convert systemtap from bool to feature option type
Now systemtap can be enabled by default in distros that use -Dauto_features=enabled or for developers who already have systemtap installed, while it's still disabled for developers who do not have systemtap installed. See #3354
This commit is contained in:
		@@ -185,7 +185,7 @@ fedora-x86_64:
 | 
			
		||||
            --prefix=$HOME/glib-installed
 | 
			
		||||
            --localstatedir=/var
 | 
			
		||||
            --libdir=lib
 | 
			
		||||
            -Dsystemtap=true
 | 
			
		||||
            -Dsystemtap=enabled
 | 
			
		||||
            -Ddtrace=enabled
 | 
			
		||||
            -Dinstalled_tests=true
 | 
			
		||||
            -Ddocumentation=true
 | 
			
		||||
@@ -240,7 +240,7 @@ debian-stable-x86_64:
 | 
			
		||||
            --prefix=$HOME/glib-installed
 | 
			
		||||
            --localstatedir=/var
 | 
			
		||||
            --libdir=lib
 | 
			
		||||
            -Dsystemtap=true
 | 
			
		||||
            -Dsystemtap=enabled
 | 
			
		||||
            -Ddtrace=enabled
 | 
			
		||||
            _build
 | 
			
		||||
    - meson compile -C _build
 | 
			
		||||
@@ -312,7 +312,7 @@ muslc-alpine-x86_64:
 | 
			
		||||
            --prefix=$HOME/glib-installed
 | 
			
		||||
            --localstatedir=/var
 | 
			
		||||
            --libdir=lib
 | 
			
		||||
            -Dsystemtap=true
 | 
			
		||||
            -Dsystemtap=enabled
 | 
			
		||||
            _build
 | 
			
		||||
    - meson compile -C _build
 | 
			
		||||
    - .gitlab-ci/run-tests.sh
 | 
			
		||||
@@ -383,7 +383,7 @@ G_DISABLE_ASSERT:
 | 
			
		||||
  script:
 | 
			
		||||
    - meson setup ${MESON_COMMON_OPTIONS}
 | 
			
		||||
            --werror
 | 
			
		||||
            -Dsystemtap=true
 | 
			
		||||
            -Dsystemtap=enabled
 | 
			
		||||
            -Ddtrace=enabled
 | 
			
		||||
            -Dinstalled_tests=true
 | 
			
		||||
            -Dglib_assert=false
 | 
			
		||||
@@ -421,7 +421,7 @@ valgrind:
 | 
			
		||||
  script:
 | 
			
		||||
    - meson setup ${MESON_COMMON_OPTIONS}
 | 
			
		||||
            --werror
 | 
			
		||||
            -Dsystemtap=true
 | 
			
		||||
            -Dsystemtap=enabled
 | 
			
		||||
            -Ddtrace=enabled
 | 
			
		||||
            -Dinstalled_tests=true
 | 
			
		||||
            -Dintrospection=enabled
 | 
			
		||||
@@ -766,7 +766,7 @@ scan-build:
 | 
			
		||||
            --localstatedir=/var
 | 
			
		||||
            --libdir=lib
 | 
			
		||||
            -Dglib_debug=enabled
 | 
			
		||||
            -Dsystemtap=true
 | 
			
		||||
            -Dsystemtap=enabled
 | 
			
		||||
            -Ddtrace=enabled
 | 
			
		||||
            -Dinstalled_tests=true
 | 
			
		||||
            -Dintrospection=enabled
 | 
			
		||||
@@ -796,7 +796,7 @@ scan-build:
 | 
			
		||||
            --prefix=$HOME/glib-installed
 | 
			
		||||
            --localstatedir=/var
 | 
			
		||||
            --libdir=lib
 | 
			
		||||
            -Dsystemtap=true
 | 
			
		||||
            -Dsystemtap=enabled
 | 
			
		||||
            -Ddtrace=enabled
 | 
			
		||||
            -Dinstalled_tests=true
 | 
			
		||||
            -Dintrospection=enabled
 | 
			
		||||
 
 | 
			
		||||
@@ -2575,10 +2575,10 @@ if cc.has_header_symbol('sys/ptrace.h', 'PTRACE_O_EXITKILL')
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
# systemtap
 | 
			
		||||
want_systemtap = get_option('systemtap')
 | 
			
		||||
enable_systemtap = false
 | 
			
		||||
systemtap = get_option('systemtap').require(enable_dtrace, error_message: 'Cannot enable systemtap because dtrace feature is disabled')
 | 
			
		||||
enable_systemtap = systemtap.allowed()
 | 
			
		||||
 | 
			
		||||
if want_systemtap and enable_dtrace
 | 
			
		||||
if enable_systemtap
 | 
			
		||||
  tapset_install_dir = get_option('tapset_install_dir')
 | 
			
		||||
  if tapset_install_dir == ''
 | 
			
		||||
    tapset_install_dir = join_paths(get_option('datadir'), 'systemtap/tapset', host_machine.cpu_family())
 | 
			
		||||
@@ -2587,7 +2587,6 @@ if want_systemtap and enable_dtrace
 | 
			
		||||
  stp_cdata.set('ABS_GLIB_RUNTIME_LIBDIR', glib_libdir)
 | 
			
		||||
  stp_cdata.set('LT_CURRENT', minor_version * 100)
 | 
			
		||||
  stp_cdata.set('LT_REVISION', micro_version)
 | 
			
		||||
  enable_systemtap = true
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
# introspection
 | 
			
		||||
 
 | 
			
		||||
@@ -56,8 +56,9 @@ option('dtrace',
 | 
			
		||||
       description : 'include tracing support for dtrace')
 | 
			
		||||
 | 
			
		||||
option('systemtap',
 | 
			
		||||
       type : 'boolean',
 | 
			
		||||
       value : false,
 | 
			
		||||
       type : 'feature',
 | 
			
		||||
       value : 'auto',
 | 
			
		||||
       deprecated : { 'true': 'enabled', 'false': 'disabled' },
 | 
			
		||||
       description : 'include tracing support for systemtap')
 | 
			
		||||
 | 
			
		||||
option('tapset_install_dir',
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user