Skip to content

Commit

Permalink
fix(linux): disable assertions in release builds
Browse files Browse the repository at this point in the history
This change uses the G_DISABLE_ASSERT flag to disable assertions
for release builds.

See https://docs.gtk.org/glib/func.assert.html
  • Loading branch information
ermshiperete committed Nov 27, 2024
1 parent 06cd709 commit 767d7c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions linux/ibus-keyman/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ project('ibus-keyman', 'c', 'cpp',
# meson doesn't allow us to reference a file outside its root
subdir('resources')

if get_option('buildtype') != 'debug'
# Disable assertions on release builds
defns += ['-DG_DISABLE_ASSERT']
endif

conf = configuration_data()

ibus = dependency('ibus-1.0', version: '>= 1.2.0')
Expand Down
2 changes: 2 additions & 0 deletions linux/ibus-keyman/src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ configure_file(

exe = executable(
'ibus-engine-keyman',
c_args: defns,
cpp_args: defns,
sources: [engine_files, util_files],
dependencies: deps,
include_directories: include_dirs,
Expand Down

0 comments on commit 767d7c6

Please sign in to comment.