diff --git a/client.c b/client.c index 975269b1..93dcc666 100644 --- a/client.c +++ b/client.c @@ -35,8 +35,10 @@ static const char * version_and_features(void) { static char buf[256]; - snprintf(buf, sizeof(buf), "version: %s %cime", - FOOT_VERSION, feature_ime() ? '+' : '-'); + snprintf(buf, sizeof(buf), "version: %s %cime %cpgo", + FOOT_VERSION, + feature_ime() ? '+' : '-', + feature_pgo() ? '+' : '-'); return buf; } diff --git a/foot-features.h b/foot-features.h index 8da22f6c..ae00c564 100644 --- a/foot-features.h +++ b/foot-features.h @@ -10,3 +10,12 @@ static inline bool feature_ime(void) return false; #endif } + +static inline bool feature_pgo(void) +{ +#if defined(FOOT_PGO_ENABLED) && FOOT_PGO_ENABLED + return true; +#else + return false; +#endif +} diff --git a/main.c b/main.c index 0941d3db..2c14d6d0 100644 --- a/main.c +++ b/main.c @@ -45,8 +45,10 @@ static const char * version_and_features(void) { static char buf[256]; - snprintf(buf, sizeof(buf), "version: %s %cime", - FOOT_VERSION, feature_ime() ? '+' : '-'); + snprintf(buf, sizeof(buf), "version: %s %cime %cpgo", + FOOT_VERSION, + feature_ime() ? '+' : '-', + feature_pgo() ? '+' : '-'); return buf; } diff --git a/meson.build b/meson.build index 01f27be9..e1b23102 100644 --- a/meson.build +++ b/meson.build @@ -24,6 +24,9 @@ add_project_arguments( (get_option('ime') ? ['-DFOOT_IME_ENABLED=1'] : []) + + (get_option('b_pgo') == 'use' + ? ['-DFOOT_PGO_ENABLED=1'] + : []) + cc.get_supported_arguments( ['-pedantic', '-fstrict-aliasing',