mirror of
https://github.com/lbonn/rofi
synced 2024-11-26 05:40:23 +00:00
[Build] Add option to build with lto to meson.
Fix error in test. Issue: #1743
This commit is contained in:
parent
53391da45a
commit
fb80595725
3 changed files with 10 additions and 2 deletions
|
@ -30,6 +30,13 @@ foreach f : flags
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
if get_option('lto')
|
||||||
|
add_project_arguments('-flto', language: 'c')
|
||||||
|
add_project_arguments('-Werror=odr', language: 'c')
|
||||||
|
add_project_arguments('-Werror=lto-type-mismatch', language: 'c')
|
||||||
|
add_project_arguments('-Werror=strict-aliasing', language: 'c')
|
||||||
|
endif
|
||||||
|
|
||||||
plugindir = join_paths(get_option('libdir'), meson.project_name())
|
plugindir = join_paths(get_option('libdir'), meson.project_name())
|
||||||
themedir = join_paths(get_option('datadir'), meson.project_name(), 'themes')
|
themedir = join_paths(get_option('datadir'), meson.project_name(), 'themes')
|
||||||
desktop_install_dir = join_paths(get_option('datadir'), 'applications')
|
desktop_install_dir = join_paths(get_option('datadir'), 'applications')
|
||||||
|
|
|
@ -2,3 +2,4 @@ option('drun', type: 'boolean', value: true, description: 'Desktop file mode')
|
||||||
option('window', type: 'boolean', value: true, description: 'Window switcher mode')
|
option('window', type: 'boolean', value: true, description: 'Window switcher mode')
|
||||||
option('check', type: 'feature', description: 'Build and run libcheck-based tests')
|
option('check', type: 'feature', description: 'Build and run libcheck-based tests')
|
||||||
option('imdkit', type: 'boolean', value: true, description: 'IMDKit support')
|
option('imdkit', type: 'boolean', value: true, description: 'IMDKit support')
|
||||||
|
option('lto', type: 'boolean', value: false, description: 'Compile with lto')
|
||||||
|
|
|
@ -97,8 +97,8 @@ char *helper_get_theme_path(const char *file, G_GNUC_UNUSED const char *ext) {
|
||||||
}
|
}
|
||||||
void rofi_add_error_message(G_GNUC_UNUSED GString *msg) {}
|
void rofi_add_error_message(G_GNUC_UNUSED GString *msg) {}
|
||||||
void rofi_add_warning_message(G_GNUC_UNUSED GString *msg) {}
|
void rofi_add_warning_message(G_GNUC_UNUSED GString *msg) {}
|
||||||
int textbox_get_estimated_char_height(void);
|
double textbox_get_estimated_char_height(void);
|
||||||
int textbox_get_estimated_char_height(void) { return 16; }
|
double textbox_get_estimated_char_height(void) { return 16; }
|
||||||
double textbox_get_estimated_ch(void);
|
double textbox_get_estimated_ch(void);
|
||||||
double textbox_get_estimated_ch(void) { return 8; }
|
double textbox_get_estimated_ch(void) { return 8; }
|
||||||
void rofi_view_get_current_monitor(G_GNUC_UNUSED int *width,
|
void rofi_view_get_current_monitor(G_GNUC_UNUSED int *width,
|
||||||
|
|
Loading…
Reference in a new issue