diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-03-26 19:30:13 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-03-26 19:30:13 +0000 |
| commit | 9b20764f35094963ecbfc40a972ef54443630447 (patch) | |
| tree | ab76f3470a6a16e36e32d808f6d75f25389d4974 | |
| parent | Merge branch 'buffer-size-multiple-of-scale-factor' (diff) | |
features: --version now logs +/-pgo
That is, whether the binary was compiled with PGO or not.
| -rw-r--r-- | client.c | 6 | ||||
| -rw-r--r-- | foot-features.h | 9 | ||||
| -rw-r--r-- | main.c | 6 | ||||
| -rw-r--r-- | meson.build | 3 |
4 files changed, 20 insertions, 4 deletions
@@ -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 +} @@ -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', |
